summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorjvoisin2018-03-13 01:01:07 +0100
committerjvoisin2018-03-13 01:01:07 +0100
commit67ce0f739fad547a515733db4eeafde28ecc065a (patch)
tree28ed7e788b3c97e6c005a062070880fb2a93a39e /tests
parent13d2507d605ca418dfe8abbb63f5de69cd8a6bec (diff)
Add a working test
Diffstat (limited to 'tests')
-rw-r--r--tests/test_libmat2.py27
1 files changed, 27 insertions, 0 deletions
diff --git a/tests/test_libmat2.py b/tests/test_libmat2.py
new file mode 100644
index 0000000..56b960e
--- /dev/null
+++ b/tests/test_libmat2.py
@@ -0,0 +1,27 @@
1#!/usr/bin/python3
2
3import unittest
4import shutil
5import os
6
7from src import parsers
8from src.parsers import pdf
9
10class TestGetMeta(unittest.TestCase):
11 def test_pdf(self):
12 p = pdf.PDFParser('./tests/data/dirty.pdf')
13 meta = p.get_meta().items()
14
15
16class TestCleaning(unittest.TestCase):
17 def setUp(self):
18 shutil.copy('./tests/data/dirty.pdf', './tests/data/clean.pdf')
19
20 def tearDown(self):
21 #os.remove('./tests/data/clean.pdf')
22 pass
23
24 def test_pdf(self):
25 p = pdf.PDFParser('./tests/data/clean.pdf')
26 p.remove_all()
27 #self.assertEqual(p.get_meta(), {})