Skip to content

Commit

Permalink
windows fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinThoma committed Oct 17, 2023
1 parent 62554c2 commit 4969804
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/github-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:
python -c "from tests import download_test_pdfs; download_test_pdfs()"
- name: Test with pytest
run: |
python -m coverage run --parallel-mode -m pytest tests -vv
python -m pytest tests --cov=pypdf --cov-append -n auto -vv
tests:
Expand Down
5 changes: 4 additions & 1 deletion tests/test_filters.py
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,10 @@ def test_issue_399():
reader.pages[1].extract_text()


@pytest.mark.skipif(sys.platform.startswith("win"))
@pytest.mark.skipif(
sys.platform.startswith("win"),
reason="Supbrocess running python seems to linux-specific",
)
@pytest.mark.enable_socket()
def test_image_without_pillow(tmp_path):
url = "https://corpora.tika.apache.org/base/docs/govdocs1/914/914102.pdf"
Expand Down
1 change: 1 addition & 0 deletions tests/test_workflows.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ def test_pdfreader_file_load():
for expected_line, actual_line in zip(text.splitlines(), pdftext.splitlines()):
assert expected_line == actual_line

pdftext = pdftext.replace(b"\r\n", b"\n") # fix for windows
assert text == pdftext, (
"PDF extracted text differs from expected value.\n\n"
"Expected:\n\n%r\n\nExtracted:\n\n%r\n\n" % (pdftext, text)
Expand Down

0 comments on commit 4969804

Please sign in to comment.