Skip to content

Commit 09bb448

Browse files
authored
Merge pull request #6383 from havarddj/main
Write test files to system temp directory instead of hardcoding
2 parents 2a83402 + a03c639 commit 09bb448

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lmfdb/number_fields/draw_spectrum.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,8 @@ def test_drawspec(n=1, gaga=False):
256256
num_primes = 7 if gaga else 100
257257
canvas = draw_spec(frobs, local_algs, True,
258258
gaga=gaga,num_primes=num_primes)
259-
filename = f"/tmp/{'gaga' if gaga else 'test'}.svg"
259+
import tempfile
260+
filename = tempfile.gettempdir() + ('/gaga' if gaga else '/spec') + ".svg"
260261
with open(filename, mode='w') as f:
261262
f.write(canvas.as_str())
262263

0 commit comments

Comments
 (0)