File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change 66from unittest import TestCase
77import tkinter as tk
88import tksvg
9+ import os
910
1011
1112class 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
You can’t perform that action at this time.
0 commit comments