Skip to content

Commit 91c56ba

Browse files
committed
Update path finding in tests
1 parent 916842d commit 91c56ba

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

tests/test_tksvg.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,22 @@
66
from unittest import TestCase
77
import tkinter as tk
88
import tksvg
9+
import os
910

1011

1112
class TestTkSVG(TestCase):
1213
def setUp(self):
1314
self.window = tk.Tk()
15+
self._path = os.path.abspath(os.path.dirname(__file__))
1416

1517
def test_tksvg_load(self):
1618
tksvg.load(self.window)
1719
# Create test PhotoImage
18-
tk.PhotoImage(file="tests/orb.svg")
20+
tk.PhotoImage(file=os.path.join(self._path, "orb.svg"))
1921

2022
def test_svg_image(self):
2123
tksvg.load(self.window)
22-
image = tksvg.SvgImage(file="tests/orb.svg", scale=0.5)
24+
image = tksvg.SvgImage(file=os.path.join(self._path, "orb.svg"), scale=0.5)
2325
self.assertEqual(image.cget("scale"), 0.5)
2426
self.assertEqual(image.cget("scale"), image["scale"])
2527

0 commit comments

Comments
 (0)