def test_foo(): f1 = Foo(10) f2 = Foo(10) f3 = Foo(10) s = {f1, f2, f3} assert len(s) == 1 assert hash(f1) == hash(f2) assert hash(f2) == hash(f3)
def test3(self): foo = Foo() s = 'facebookmicrosoftfacebookgooglemicrosoft' p = 'xyxzy' res = foo.match(s, p) self.assertEqual(res, True)
def test1(self): foo = Foo() s = 'ababab' p = 'xxx' res = foo.match(s, p) self.assertEqual(res, True)
def test2(self): foo = Foo() s = 'ababa' p = 'xxx' res = foo.match(s, p) self.assertEqual(res, False)