[Python-checkins] r80054 - in python/branches/py3k-issue4970/Lib/test: regrtest.py test_os.py
mark.dickinson
python-checkins at python.org
Tue Apr 13 16:07:12 CEST 2010
Author: mark.dickinson
Date: Tue Apr 13 16:07:12 2010
New Revision: 80054
Log:
Try to find minimal Python example that triggers signal 32 failure.
Modified:
python/branches/py3k-issue4970/Lib/test/regrtest.py
python/branches/py3k-issue4970/Lib/test/test_os.py
Modified: python/branches/py3k-issue4970/Lib/test/regrtest.py
==============================================================================
--- python/branches/py3k-issue4970/Lib/test/regrtest.py (original)
+++ python/branches/py3k-issue4970/Lib/test/regrtest.py Tue Apr 13 16:07:12 2010
@@ -260,6 +260,8 @@
'runleaks', 'huntrleaks=', 'memlimit=', 'randseed=',
'multiprocess=', 'slaveargs=', 'forever', 'debug', 'start=',
'nowindows'])
+ # Issue #4970: pretend that args were test_os and test_wait3
+ args = ['test_os', 'test_wait3']
except getopt.error as msg:
usage(msg)
@@ -270,6 +272,8 @@
use_resources = []
debug = False
start = None
+ # Issue #4970: always give verbose output
+ verbose = 1
for o, a in opts:
if o in ('-h', '--help'):
print(__doc__)
@@ -294,7 +298,9 @@
elif o in ('-S', '--slow'):
print_slow = True
elif o in ('-r', '--randomize'):
- randomize = True
+ # Issue 4970: don't randomize
+ # randomize = True
+ pass
elif o == '--randseed':
random_seed = int(a)
elif o in ('-f', '--fromfile'):
Modified: python/branches/py3k-issue4970/Lib/test/test_os.py
==============================================================================
--- python/branches/py3k-issue4970/Lib/test/test_os.py (original)
+++ python/branches/py3k-issue4970/Lib/test/test_os.py Tue Apr 13 16:07:12 2010
@@ -588,10 +588,16 @@
pass
class ExecTests(unittest.TestCase):
- def XXXtest_execvpe_with_bad_program(self):
- self.assertRaises(OSError, os.execvpe, 'no such app-', ['no such app-'], None)
+ def test_execvpe_with_bad_program(self):
+ for dir in os.environ.get('PATH', os.defpath).split(os.pathsep):
+ fullname = os.path.join(dir, 'no such app-')
+ try:
+ print("os.execv({!r}, ['no such app-'])".format(fullname))
+ os.execv(fullname, ['no such app-'])
+ except OSError:
+ pass
- def test_execvpe_with_bad_arglist(self):
+ def XXXtest_execvpe_with_bad_arglist(self):
self.assertRaises(ValueError, os.execvpe, 'notepad', [], None)
class ArgTests(unittest.TestCase):
@@ -859,20 +865,20 @@
def test_main():
support.run_unittest(
- ArgTests,
- FileTests,
- StatAttributeTests,
- EnvironTests,
- WalkTests,
- MakedirTests,
- DevNullTests,
- URandomTests,
+ #ArgTests,
+ #FileTests,
+ #StatAttributeTests,
+ #EnvironTests,
+ #WalkTests,
+ #MakedirTests,
+ #DevNullTests,
+ #URandomTests,
ExecTests,
- Win32ErrorTests,
- TestInvalidFD,
- PosixUidGidTests,
- Pep383Tests,
- Win32KillTests
+ #Win32ErrorTests,
+ #TestInvalidFD,
+ #PosixUidGidTests,
+ #Pep383Tests,
+ #Win32KillTests
)
if __name__ == "__main__":
More information about the Python-checkins
mailing list