MCPcopy Index your code
hub / github.com/python/cpython / test_pathext_with_multidot_extension

Method test_pathext_with_multidot_extension

Lib/test/test_shutil.py:2547–2556  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

2545
2546 @unittest.skipUnless(sys.platform == "win32", 'test specific to Windows')
2547 def test_pathext_with_multidot_extension(self):
2548 ext = '.foo.bar'
2549 cmd = self.to_text_type(TESTFN2)
2550 cmdext = cmd + self.to_text_type(ext)
2551 filepath = os.path.join(self.dir, cmdext)
2552 self.create_file(filepath)
2553 with os_helper.EnvironmentVarGuard() as env:
2554 env['PATHEXT'] = ext
2555 self.assertEqual(shutil.which(cmd, path=self.dir), filepath)
2556 self.assertEqual(shutil.which(cmdext, path=self.dir), filepath)
2557
2558 @unittest.skipUnless(sys.platform == "win32", 'test specific to Windows')
2559 def test_pathext_with_null_extension(self):

Callers

nothing calls this directly

Calls 3

create_fileMethod · 0.95
joinMethod · 0.45
assertEqualMethod · 0.45

Tested by

no test coverage detected