-
Notifications
You must be signed in to change notification settings - Fork 76
Closed
Description
Hi,
I'm having trouble with contains_only method from assertpy. My understanding is that this assertion should check if two iterables has same elements: is set(list1) equal to set(list2). In fact, this method is checking if iterable under tests is a subset of an argument of contains_only. assertpy version is 0.12
import unittest
from assertpy import assert_that
class AssertPyTestContainsOnly(unittest.TestCase):
def test_contains_only(self):
some_list = ["a", "b", "c"]
assert_that(some_list).contains_only("x", "a", "b", "c")This test is passing but some_list doesn't contain x. Is should it behave like this? If yes, the name is quite misleading.