summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorjvoisin2018-03-06 23:20:18 +0100
committerjvoisin2018-03-06 23:20:18 +0100
commit13d2507d605ca418dfe8abbb63f5de69cd8a6bec (patch)
tree12a02f5a6968f2a89b24b1f5734c229e9d39e386 /tests
First commit
Diffstat (limited to 'tests')
-rw-r--r--tests/data/dirty.pdfbin0 -> 543475 bytes
-rw-r--r--tests/main.py22
2 files changed, 22 insertions, 0 deletions
diff --git a/tests/data/dirty.pdf b/tests/data/dirty.pdf
new file mode 100644
index 0000000..0d88779
--- /dev/null
+++ b/tests/data/dirty.pdf
Binary files differ
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()