File tree Expand file tree Collapse file tree 1 file changed +2
-8
lines changed Expand file tree Collapse file tree 1 file changed +2
-8
lines changed Original file line number Diff line number Diff line change @@ -1729,20 +1729,14 @@ def test_env_variable_relative_paths(self):
1729
1729
"InvalidTZPathWarning" ,
1730
1730
)
1731
1731
# It should represent the current file:
1732
- self .assertTrue (
1733
- wlog [0 ].filename .endswith ("test_zoneinfo.py" ),
1734
- msg = wlog [0 ].filename ,
1735
- )
1732
+ self .assertEqual (wlog [0 ].filename , __file__ )
1736
1733
1737
1734
with self .subTest ("warning" , path_var = path_var ):
1738
1735
# Note: Per PEP 615 the warning is implementation-defined
1739
1736
# behavior, other implementations need not warn.
1740
1737
with self .assertWarns (self .module .InvalidTZPathWarning ) as w :
1741
1738
self .module .reset_tzpath ()
1742
- self .assertTrue (
1743
- w .warnings [0 ].filename .endswith ("test_zoneinfo.py" ),
1744
- msg = w .warnings [0 ].filename ,
1745
- )
1739
+ self .assertEqual (w .warnings [0 ].filename , __file__ )
1746
1740
1747
1741
tzpath = self .module .TZPATH
1748
1742
with self .subTest ("filtered" , path_var = path_var ):
You can’t perform that action at this time.
0 commit comments