Skip to content

Commit 5553497

Browse files
committed
test: remove old absolute path tests
This needs to work properly on Windows. Test to confirm relative and absolute paths lead to the same directories being used (maybe run all tests with both?)
1 parent f734b22 commit 5553497

3 files changed

Lines changed: 0 additions & 39 deletions

File tree

tests/test_baker.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,6 @@ def test_baker_init_invalid_config(tmp_path: Path, write_yaml):
4848
with pytest.raises(ValidationError) as exc_info:
4949
Baker(config_file)
5050
assert "documents" in str(exc_info.value)
51-
abs_config = Path("/tmp/test_config.yaml")
52-
write_yaml(abs_config, {"documents": [], "directories": {"base": "/tmp"}})
53-
baker = Baker(abs_config)
54-
assert baker.config.directories.base == Path("/tmp")
5551

5652

5753
def test_baker_examples():

tests/test_cli.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -62,14 +62,6 @@ def test_cli_bake_invalid_config(tmp_path: Path):
6262
'Value error, Key "documents" missing' in exception_str
6363
or "Field required" in exception_str
6464
)
65-
abs_config = Path("/tmp/test_config.yaml")
66-
abs_config.write_text("""
67-
documents: []
68-
directories:
69-
base: /tmp
70-
""")
71-
result = runner.invoke(cli, [str(abs_config)])
72-
assert result.exit_code == 0
7365

7466

7567
def test_cli_bake_verbosity_flags(tmp_path: Path):

tests/test_pdf.py

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -152,33 +152,6 @@ def test_combine_pdfs_invalid_file(tmp_path: Path) -> None:
152152
with pytest.raises(PDFCombineError) as exc_info:
153153
combine_pdfs([pdf_file], output_file)
154154
assert "Failed to combine PDFs" in str(exc_info.value)
155-
abs_pdf = Path("/tmp/test.pdf")
156-
abs_pdf.write_bytes(
157-
b"%PDF-1.4\n"
158-
b"1 0 obj\n"
159-
b"<< /Type /Catalog /Pages 2 0 R >>\n"
160-
b"endobj\n"
161-
b"2 0 obj\n"
162-
b"<< /Type /Pages /Kids [3 0 R] /Count 1 >>\n"
163-
b"endobj\n"
164-
b"3 0 obj\n"
165-
b"<< /Type /Page /Parent 2 0 R /Resources <<>> /MediaBox [0 0 612 792] >>\n"
166-
b"endobj\n"
167-
b"xref\n"
168-
b"0 4\n"
169-
b"0000000000 65535 f\n"
170-
b"0000000010 00000 n\n"
171-
b"0000000056 00000 n\n"
172-
b"0000000112 00000 n\n"
173-
b"trailer\n"
174-
b"<< /Size 4 /Root 1 0 R >>\n"
175-
b"startxref\n"
176-
b"164\n"
177-
b"%%EOF\n"
178-
)
179-
abs_output = Path("/tmp/output.pdf")
180-
combine_pdfs([abs_pdf], abs_output)
181-
assert abs_output.exists() and abs_output.stat().st_size > 0
182155

183156

184157
def test_convert_svg_to_pdf_cairosvg(tmp_path: Path) -> None:

0 commit comments

Comments
 (0)