We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
os.path.abspath
1 parent 531e7c3 commit 7d4d601Copy full SHA for 7d4d601
Lib/test/test_pkgutil.py
@@ -76,7 +76,7 @@ def test_getdata_path_traversal(self):
76
with self.assertRaises(ValueError):
77
pkgutil.get_data(pkg, 'sub/../../../etc/passwd')
78
79
- pkgutil.get_data(pkg, os.sep + 'etc' + os.sep + 'passwd')
+ pkgutil.get_data(pkg, os.path.abspath('/etc/passwd'))
80
81
del sys.modules[pkg]
82
0 commit comments