Add a working test
This commit is contained in:
parent
13d2507d60
commit
67ce0f739f
27
tests/test_libmat2.py
Normal file
27
tests/test_libmat2.py
Normal file
@ -0,0 +1,27 @@
|
||||
#!/usr/bin/python3
|
||||
|
||||
import unittest
|
||||
import shutil
|
||||
import os
|
||||
|
||||
from src import parsers
|
||||
from src.parsers import pdf
|
||||
|
||||
class TestGetMeta(unittest.TestCase):
|
||||
def test_pdf(self):
|
||||
p = pdf.PDFParser('./tests/data/dirty.pdf')
|
||||
meta = p.get_meta().items()
|
||||
|
||||
|
||||
class TestCleaning(unittest.TestCase):
|
||||
def setUp(self):
|
||||
shutil.copy('./tests/data/dirty.pdf', './tests/data/clean.pdf')
|
||||
|
||||
def tearDown(self):
|
||||
#os.remove('./tests/data/clean.pdf')
|
||||
pass
|
||||
|
||||
def test_pdf(self):
|
||||
p = pdf.PDFParser('./tests/data/clean.pdf')
|
||||
p.remove_all()
|
||||
#self.assertEqual(p.get_meta(), {})
|
Loading…
Reference in New Issue
Block a user