summaryrefslogtreecommitdiff
path: root/tests/main.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/main.py')
-rw-r--r--tests/main.py22
1 files changed, 22 insertions, 0 deletions
diff --git a/tests/main.py b/tests/main.py
new file mode 100644
index 0000000..52828af
--- /dev/null
+++ b/tests/main.py
@@ -0,0 +1,22 @@
1#!/usr/bin/python3
2
3import unittest
4
5class TestCleaning(unittest.TestCase):
6 def test_pdf(self):
7 self.assertEqual('foo'.upper(), 'FOO')
8
9 def test_isupper(self):
10 self.assertTrue('FOO'.isupper())
11 self.assertFalse('Foo'.isupper())
12
13 def test_split(self):
14 s = 'hello world'
15 self.assertEqual(s.split(), ['hello', 'world'])
16 # check that s.split fails when the separator is not a string
17 with self.assertRaises(TypeError):
18 s.split(2)
19
20
21if __name__ == '__main__':
22 unittest.main()