We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7435d2f commit ea37d02Copy full SHA for ea37d02
tests/test_integration_xcebra.py
@@ -16,16 +16,21 @@
16
17
@pytest.fixture
18
def synthetic_data():
19
- import os
+ import tempfile
20
import urllib.request
21
+ from pathlib import Path
22
23
url = "https://cebra.fra1.digitaloceanspaces.com/xcebra_synthetic_data.pkl"
- filepath = "/tmp/synthetic_data.pkl"
24
25
- if not os.path.exists(filepath):
+ # Create a persistent temp directory specific to this test
26
+ temp_dir = Path(tempfile.gettempdir()) / "cebra_test_data"
27
+ temp_dir.mkdir(exist_ok=True)
28
+ filepath = temp_dir / "synthetic_data.pkl"
29
+
30
+ if not filepath.exists():
31
urllib.request.urlretrieve(url, filepath)
32
- with open(filepath, 'rb') as file:
33
+ with filepath.open('rb') as file:
34
return pickle.load(file)
35
36
0 commit comments