Skip to content

Commit 43aaee4

Browse files
Merge pull request #176 from chinapandaman/PPF-170
PPF-170: setup conftest
2 parents 70139de + 83159c9 commit 43aaee4

File tree

3 files changed

+29
-1
lines changed

3 files changed

+29
-1
lines changed

PyPDFForm/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@
44

55
PyPDFForm = Wrapper
66

7-
__version__ = "0.3.0"
7+
__version__ = "0.3.1"

tests/functional/scenario/conftest.py

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# -*- coding: utf-8 -*-
2+
3+
import os
4+
5+
import pytest
6+
7+
8+
@pytest.fixture
9+
def pdf_directory():
10+
return os.path.join(
11+
os.path.dirname(__file__), "..", "..", "..", "pdf_samples", "scenario"
12+
)
13+
14+
15+
@pytest.fixture
16+
def sample_job_application(pdf_directory):
17+
return os.path.join(pdf_directory, "sample_job_application.pdf")
+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# -*- coding: utf-8 -*-
2+
3+
import os
4+
5+
6+
def test_fixture_setup(pdf_directory, sample_job_application):
7+
assert os.path.isdir(pdf_directory)
8+
assert os.path.isfile(sample_job_application)
9+
10+
file_extension = os.path.splitext(sample_job_application)[1]
11+
assert file_extension == ".pdf"

0 commit comments

Comments
 (0)