def test_is_not_negates(Tester): """IsNot negates the resolution it is passed""" fake_xpath = "//xpath" fake_target = Target.the("fake").located_by(fake_xpath) mocked_btw = Tester.ability_to(BrowseTheWeb) mocked_btw.to_find_all.return_value = [1, 2, 3] Tester.should_see_the((List.of(fake_target), IsNot(Empty())))
def test_the_test(self): """Empty tests what it says on the tin""" e = Empty() self.assertTrue(e.matches([])) self.assertFalse(e.matches(["not", "empty"]))
def test_can_be_instantiated(self): """Empty can be instantiated""" e = Empty() self.assertIsInstance(e, Empty)
def test_the_test(self): """Empty tests what it says on the tin""" e = Empty() assert e.matches([]) assert not e.matches(["not", "empty"])