summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_shutil.py
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2013-12-16 22:39:40 (GMT)
committerVictor Stinner <victor.stinner@gmail.com>2013-12-16 22:39:40 (GMT)
commit1d006a2c0e9831a936033304f31e5abc12f60042 (patch)
treedd864eda4680aea76557ee48b8ab8261d7c06958 /Lib/test/test_shutil.py
parent711e27cd503933cfe7a42d931d2b69dc79014ae0 (diff)
downloadcpython-1d006a2c0e9831a936033304f31e5abc12f60042.zip
cpython-1d006a2c0e9831a936033304f31e5abc12f60042.tar.gz
cpython-1d006a2c0e9831a936033304f31e5abc12f60042.tar.bz2
Backout a1a05e2724dd: shutil.which(bytes) is a new feature and my patch does not work on Windows
Diffstat (limited to 'Lib/test/test_shutil.py')
-rw-r--r--Lib/test/test_shutil.py13
1 files changed, 2 insertions, 11 deletions
diff --git a/Lib/test/test_shutil.py b/Lib/test/test_shutil.py
index 7314782..98ea6d1 100644
--- a/Lib/test/test_shutil.py
+++ b/Lib/test/test_shutil.py
@@ -1326,7 +1326,6 @@ class TestWhich(unittest.TestCase):
os.chmod(self.temp_file.name, stat.S_IXUSR)
self.addCleanup(self.temp_file.close)
self.dir, self.file = os.path.split(self.temp_file.name)
- self.env_path = self.dir
def test_basic(self):
# Given an EXE in a directory, it should be returned.
@@ -1395,7 +1394,7 @@ class TestWhich(unittest.TestCase):
def test_environ_path(self):
with support.EnvironmentVarGuard() as env:
- env['PATH'] = self.env_path
+ env['PATH'] = self.dir
rv = shutil.which(self.file)
self.assertEqual(rv, self.temp_file.name)
@@ -1403,7 +1402,7 @@ class TestWhich(unittest.TestCase):
base_dir = os.path.dirname(self.dir)
with support.change_cwd(path=self.dir), \
support.EnvironmentVarGuard() as env:
- env['PATH'] = self.env_path
+ env['PATH'] = self.dir
rv = shutil.which(self.file, path='')
self.assertIsNone(rv)
@@ -1414,14 +1413,6 @@ class TestWhich(unittest.TestCase):
self.assertIsNone(rv)
-class TestWhichBytes(TestWhich):
- def setUp(self):
- TestWhich.setUp(self)
- self.dir = os.fsencode(self.dir)
- self.file = os.fsencode(self.file)
- self.temp_file.name = os.fsencode(self.temp_file.name)
-
-
class TestMove(unittest.TestCase):
def setUp(self):