1
0
mirror of synced 2024-06-01 03:48:04 +02:00
mat2/tests/main.py
2018-03-06 23:20:18 +01:00

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()