Show More
@@ -230,6 +230,18 b' else:' | |||||
230 | osenvironb = os.environ |
|
230 | osenvironb = os.environ | |
231 | getcwdb = os.getcwd |
|
231 | getcwdb = os.getcwd | |
232 |
|
232 | |||
|
233 | if WINDOWS: | |||
|
234 | _getcwdb = getcwdb | |||
|
235 | ||||
|
236 | def getcwdb(): | |||
|
237 | cwd = _getcwdb() | |||
|
238 | if re.match(b'^[a-z]:', cwd): | |||
|
239 | # os.getcwd() is inconsistent on the capitalization of the drive | |||
|
240 | # letter, so adjust it. see https://bugs.python.org/issue40368 | |||
|
241 | cwd = cwd[0:1].upper() + cwd[1:] | |||
|
242 | return cwd | |||
|
243 | ||||
|
244 | ||||
233 | # For Windows support |
|
245 | # For Windows support | |
234 | wifexited = getattr(os, "WIFEXITED", lambda x: False) |
|
246 | wifexited = getattr(os, "WIFEXITED", lambda x: False) | |
235 |
|
247 | |||
@@ -3078,7 +3090,6 b' class TestRunner(object):' | |||||
3078 |
|
3090 | |||
3079 | def _run(self, testdescs): |
|
3091 | def _run(self, testdescs): | |
3080 | testdir = getcwdb() |
|
3092 | testdir = getcwdb() | |
3081 | self._testdir = osenvironb[b'TESTDIR'] = getcwdb() |
|
|||
3082 | # assume all tests in same folder for now |
|
3093 | # assume all tests in same folder for now | |
3083 | if testdescs: |
|
3094 | if testdescs: | |
3084 | pathname = os.path.dirname(testdescs[0]['path']) |
|
3095 | pathname = os.path.dirname(testdescs[0]['path']) |
General Comments 0
You need to be logged in to leave comments.
Login now