We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a96d2f3 commit 502e371Copy full SHA for 502e371
tests/conftest.py
@@ -0,0 +1,25 @@
1
+"""
2
+Pytest configuration file to set up test environment.
3
4
+import pytest
5
+from pathlib import Path
6
+
7
8
+@pytest.fixture(scope="session", autouse=True)
9
+def setup_test_environment(tmp_path_factory):
10
+ """
11
+ Set up the test environment before running any tests.
12
+ Uses pytest's temporary directory for test isolation.
13
14
+ import pulse
15
16
+ # Create a pytest temporary directory for test projects
17
+ temp_dir = tmp_path_factory.mktemp("temp_pulse")
18
19
+ # Override the module-level constants
20
+ pulse.TEMP_PROJECT_DIR = temp_dir
21
+ pulse.TEMP_PROJECT_FILE = str(temp_dir / "tmp.pulse")
22
23
+ yield
24
25
+ # Cleanup is handled automatically by pytest
0 commit comments