Skip to main content

Create a basic conftest.py file

ID
f599151
date
2024-05-20 21:30:34+00:00
author
Alex Chan <alex@alexwlchan.net>
parent
ef7350a
message
Create a basic conftest.py file
changed files
2 files, 13 additions, 10 deletions

Changed files

tests/conftest.py (0) → tests/conftest.py (294)

diff --git a/tests/conftest.py b/tests/conftest.py
new file mode 100644
index 0000000..489122c
--- /dev/null
+++ b/tests/conftest.py
@@ -0,0 +1,13 @@
+import pathlib
+
+import pytest
+
+
+@pytest.fixture
+def out_path(tmp_path: pathlib.Path) -> None:
+    """
+    Returns a temporary path where we can write a webarchive.
+
+    Any files written to this path will be cleaned up at the end of the test.
+    """
+    return tmp_path / "example.webarchive"

tests/test_save_safari_webarchive.py (4044) → tests/test_save_safari_webarchive.py (3780)

diff --git a/tests/test_save_safari_webarchive.py b/tests/test_save_safari_webarchive.py
index 03e9e94..aaaf34f 100755
--- a/tests/test_save_safari_webarchive.py
+++ b/tests/test_save_safari_webarchive.py
@@ -10,16 +10,6 @@ import pytest
 from utils import save_safari_webarchive
 
 
-@pytest.fixture
-def out_path(tmp_path: pathlib.Path) -> None:
-    """
-    Returns a temporary path where we can write a webarchive.
-
-    Any files written to this path will be cleaned up at the end of the test.
-    """
-    return tmp_path / "example.webarchive"
-
-
 def test_creates_a_single_archive(out_path: pathlib.Path) -> None:
     result = save_safari_webarchive(["https://example.com", out_path])