1
0
Fork 0
mat2/tests/main.py

23 lines
553 B
Python

#!/usr/bin/python3
import unittest
class TestCleaning(unittest.TestCase):
def test_pdf(self):
self.assertEqual('foo'.upper(), 'FOO')
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)
if __name__ == '__main__':
unittest.main()