From cc4e39b3fc2c696bf126795250ee94ad7586150d Mon Sep 17 00:00:00 2001 From: Alex Pyrgiotis Date: Tue, 22 Nov 2022 01:04:46 +0200 Subject: [PATCH] Add a bad PDF file in our test samples Add a bad PDF file in our test samples, which we can use for testing purposes. --- tests/__init__.py | 3 ++- tests/test_docs/sample_bad_pdf.pdf | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 tests/test_docs/sample_bad_pdf.pdf diff --git a/tests/__init__.py b/tests/__init__.py index 2733a0f..ff9d57d 100644 --- a/tests/__init__.py +++ b/tests/__init__.py @@ -14,7 +14,8 @@ test_docs_dir = Path(__file__).parent.joinpath(SAMPLE_DIRECTORY) test_docs = [ p for p in test_docs_dir.rglob("*") - if p.is_file() and not p.name.endswith(SAFE_EXTENSION) + if p.is_file() + and not (p.name.endswith(SAFE_EXTENSION) or p.name.startswith("sample_bad")) ] # Pytest parameter decorators diff --git a/tests/test_docs/sample_bad_pdf.pdf b/tests/test_docs/sample_bad_pdf.pdf new file mode 100644 index 0000000..0e99b63 --- /dev/null +++ b/tests/test_docs/sample_bad_pdf.pdf @@ -0,0 +1 @@ +badpdf