diff --git a/IPython/utils/tests/test_path.py b/IPython/utils/tests/test_path.py index 897d015..272ef2a 100644 --- a/IPython/utils/tests/test_path.py +++ b/IPython/utils/tests/test_path.py @@ -453,8 +453,9 @@ def test_get_ipython_module_path(): def test_get_long_path_name_win32(): with TemporaryDirectory() as tmpdir: - # Make a long path. - long_path = os.path.join(tmpdir, u'this is my long path name') + # Make a long path. Expands the path of tmpdir prematurely to make sure only the + # last part is different later on. + long_path = os.path.join(path.get_long_path_name(tmpdir), u'this is my long path name') os.makedirs(long_path) # Test to see if the short path evaluates correctly.