def test_getter_prime_number_not_none(self): s = MyString("seven") s.prime_number = 7 self.assertEquals(s.prime_number, 7)
def test_my_string_hash_192651(self): MyString.prime_number = 280697 s = MyString("abc") self.assertEquals(s.prime_number, 280697) self.assertEquals(hash(s), 192651)
def test_my_string_hash_3_with_prime_5(self): s = MyString("a") s.prime_number = 5 self.assertEquals(s.prime_number, 5) self.assertEquals(hash(s), 3)
def test_my_string_hash_0(self): s = MyString("") self.assertEquals(hash(s), 0)