summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
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(), {})