Exemple #1
0
 def test_roundtrip(self, num):
     self.assertThat(to_int(from_int(num)), Equals(num))
Exemple #2
0
 def test_to_int_basics(self):
     self.assertThat(to_int(""), Equals(0))
     self.assertThat(to_int("3"), Equals(0))
     self.assertThat(to_int("4"), Equals(1))
     self.assertThat(to_int("433333"), Equals(24 ** 5))
     self.assertThat(to_int("yyyyy"), Equals(24 ** 5 - 1))