Skip to content

Commit

Permalink
Add test to ensure same parameter count
Browse files Browse the repository at this point in the history
  • Loading branch information
Belval authored Aug 12, 2020
1 parent 929d89a commit 98fcdcc
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import time
import shutil
import subprocess
from inspect import signature
from subprocess import Popen, PIPE
from tempfile import TemporaryDirectory
from multiprocessing.dummy import Pool
Expand Down Expand Up @@ -1625,6 +1626,23 @@ def test_pdfinfo_locked_pdf_with_userpw_only(self):
)

@profile
def test_convert_from_functions_same_number_of_parameters(self):
start_time = time.time()
self.assertEqual(
len(signature(convert_from_path).parameters),
len(signature(convert_from_bytes).parameters),
)
print("test_convert_from_functions_same_number_of_parameters: {} sec".format(time.time() - start_time))

@profile
def test_pdfinfo_functions_same_number_of_parameters(self):
start_time = time.time()
self.assertEqual(
len(signature(pdfinfo_from_path).parameters),
len(signature(pdfinfo_from_bytes).parameters),
)
print("test_pdfinfo_functions_same_number_of_parameters: {} sec".format(time.time() - start_time))

@unittest.skipIf(not POPPLER_INSTALLED, "Poppler is not installed!")
def test_timeout_pdfinfo_from_path_241(self):
start_time = time.time()
Expand Down

0 comments on commit 98fcdcc

Please sign in to comment.