Skip to content

Commit

Permalink
Adjust dummy test case
Browse files Browse the repository at this point in the history
  • Loading branch information
iimog committed Apr 11, 2016
1 parent 98194f3 commit fddb4ff
Showing 1 changed file with 8 additions and 11 deletions.
19 changes: 8 additions & 11 deletions test/TestString.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,16 @@

class TestStringMethods(unittest.TestCase):

def test_upper(self):
self.assertEqual('foo'.upper(), 'FOO')
def test_upper(self):
self.assertEqual('foo'.upper(), 'FOO')

def test_isupper(self):
self.assertTrue('FOO'.isupper())
self.assertFalse('Foo'.isupper())
def test_isupper(self):
self.assertTrue('FOO'.isupper())
self.assertFalse('Foo'.isupper())

def test_split(self):
s = 'hello world'
self.assertEqual(s.split(), ['hello', 'world'])
# check that s.split fails when the separator is not a string
with self.assertRaises(TypeError):
s.split(2)
def test_split(self):
s = 'hello world'
self.assertEqual(s.split(), ['hello', 'world'])

if __name__ == '__main__':
unittest.main()

0 comments on commit fddb4ff

Please sign in to comment.