Commit 2c8ec63 1 parent d11b848 commit 2c8ec63 Copy full SHA for 2c8ec63
File tree 1 file changed +17
-0
lines changed
1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -1286,5 +1286,22 @@ def test_is_file_for_unreadable_dir_windows(self):
1286
1286
path .is_file ()
1287
1287
1288
1288
1289
+ class FakePathlibModulePurePathTest (unittest .TestCase ):
1290
+ def test_windows_pure_path_parsing (self ):
1291
+ """Verify faked pure Windows paths use filesystem-independent separators."""
1292
+
1293
+ path = r"C:\Windows\cmd.exe"
1294
+ self .assertEqual (
1295
+ fake_pathlib .FakePathlibModule .PureWindowsPath (path ).stem ,
1296
+ pathlib .PureWindowsPath (path ).stem ,
1297
+ )
1298
+
1299
+ path = r"C:/Windows/cmd.exe"
1300
+ self .assertEqual (
1301
+ fake_pathlib .FakePathlibModule .PureWindowsPath (path ).stem ,
1302
+ pathlib .PureWindowsPath (path ).stem ,
1303
+ )
1304
+
1305
+
1289
1306
if __name__ == "__main__" :
1290
1307
unittest .main (verbosity = 2 )
You can’t perform that action at this time.
0 commit comments