##// END OF EJS Templates
run-tests: avoid os.getcwdb() on Windows...
Matt Harbison -
r39754:ac326850 default
parent child Browse files
Show More
@@ -184,6 +184,10 b' if sys.version_info > (3, 5, 0):'
184
184
185 osenvironb = environbytes(os.environ)
185 osenvironb = environbytes(os.environ)
186
186
187 getcwdb = getattr(os, 'getcwdb')
188 if not getcwdb or os.name == 'nt':
189 getcwdb = lambda: _bytespath(os.getcwd())
190
187 elif sys.version_info >= (3, 0, 0):
191 elif sys.version_info >= (3, 0, 0):
188 print('%s is only supported on Python 3.5+ and 2.7, not %s' %
192 print('%s is only supported on Python 3.5+ and 2.7, not %s' %
189 (sys.argv[0], '.'.join(str(v) for v in sys.version_info[:3])))
193 (sys.argv[0], '.'.join(str(v) for v in sys.version_info[:3])))
@@ -200,6 +204,7 b' else:'
200
204
201 _strpath = _bytespath
205 _strpath = _bytespath
202 osenvironb = os.environ
206 osenvironb = os.environ
207 getcwdb = os.getcwd
203
208
204 # For Windows support
209 # For Windows support
205 wifexited = getattr(os, "WIFEXITED", lambda x: False)
210 wifexited = getattr(os, "WIFEXITED", lambda x: False)
@@ -2519,8 +2524,7 b' class TestRunner(object):'
2519 os.umask(oldmask)
2524 os.umask(oldmask)
2520
2525
2521 def _run(self, testdescs):
2526 def _run(self, testdescs):
2522 self._testdir = osenvironb[b'TESTDIR'] = getattr(
2527 self._testdir = osenvironb[b'TESTDIR'] = getcwdb()
2523 os, 'getcwdb', os.getcwd)()
2524 # assume all tests in same folder for now
2528 # assume all tests in same folder for now
2525 if testdescs:
2529 if testdescs:
2526 pathname = os.path.dirname(testdescs[0]['path'])
2530 pathname = os.path.dirname(testdescs[0]['path'])
General Comments 0
You need to be logged in to leave comments. Login now