1
0
mirror of synced 2024-11-22 09:14:23 +01:00
mat2/tests/test_libmat2.py
2018-03-13 01:01:07 +01:00

28 lines
625 B
Python

#!/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(), {})