diff options
author | Marcelo Lira <marcelo.lira@openbossa.org> | 2011-10-10 11:42:58 -0300 |
---|---|---|
committer | Hugo Parente Lima <hugo.pl@gmail.com> | 2012-03-08 16:18:22 -0300 |
commit | 13c40649f9cc6011df5fe460aa6f2bf2c4e59b8e (patch) | |
tree | 0bff344a02f4d0274753885801d08787eb6c329d /tests/samplebinding | |
parent | b63fb5b842459170647eba9036fda522ef251b23 (diff) |
Removes printfs and fixes str test.
Reviewed by Hugo Parente <hugo.lima@openbossa.org>
Reviewed by Luciano Wolf <luciano.wolf@openbossa.org>
Diffstat (limited to 'tests/samplebinding')
-rw-r--r-- | tests/samplebinding/str_test.py | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/tests/samplebinding/str_test.py b/tests/samplebinding/str_test.py index 99567ad92..edc9779c9 100644 --- a/tests/samplebinding/str_test.py +++ b/tests/samplebinding/str_test.py @@ -65,22 +65,14 @@ class StrTest(unittest.TestCase): self.assertEqual(s1[-1], "f"); self.assertEqual(s1[-2], "e"); - try: - print(s1[6]) - self.assertFalse(true); - except: - pass + self.assertRaises(TypeError, s1.__getitem__, 6) # setitem s1[0] = 'A' s1[1] = 'B' self.assertEqual(s1[0], 'A'); self.assertEqual(s1[1], 'B'); - try: - s1[6] = 67 - self.assertFalse(true); - except: - pass + self.assertRaises(TypeError, s1.__setitem__(6, 67)) def testReverseOperator(self): s1 = Str("hello") |