Skip to content

Commit c1dc74d

Browse files
committed
Fix hardcoded /tmp path in test_circle for Windows
1 parent 80641d1 commit c1dc74d

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

tests/test_oop.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import os
12
import cv2
23
import numpy as np
34
from rlemasklib.oop import RLEMask
@@ -258,6 +259,7 @@ def test_merge_multibool():
258259

259260

260261
def test_circle():
262+
import tempfile
261263
import imageio.v2 as imageio
262264

263265
rle = RLEMask.from_circle([499 / 2, 499 / 2], 199, imshape=(500, 500))
@@ -268,7 +270,7 @@ def test_circle():
268270
rle2 = RLEMask.from_polygon(poly, imshape=(500, 500))
269271

270272
mask = np.array(rle2 - rle)
271-
imageio.imwrite("/tmp/circle.png", mask * 255)
273+
imageio.imwrite(os.path.join(tempfile.gettempdir(), "circle.png"), mask * 255)
272274

273275

274276
def test_iou():

0 commit comments

Comments
 (0)