testing in a Python --without-threads build
I can't seem to run the regression tests in a --without-threads build. Might be interesting to configure a buildbot this way to keep ourselves honest. Bill
I can't seem to run the regression tests in a --without-threads build. Might be interesting to configure a buildbot this way to keep ourselves honest.
Because regrtest.py was importing test_socket_ssl without catching the ImportError exception: % ./python.exe ./Lib/test/regrtest.py test_socket_ssl test_socket_ssl test_socket_ssl skipped -- No module named thread 1 test skipped: test_socket_ssl Traceback (most recent call last): File "./Lib/test/regrtest.py", line 1190, in <module> main() File "./Lib/test/regrtest.py", line 416, in main e = _ExpectedSkips() File "./Lib/test/regrtest.py", line 1111, in __init__ from test import test_socket_ssl File "/local/python/trunk/src/Lib/test/test_socket_ssl.py", line 8, in <module> import threading File "/local/python/trunk/src/Lib/threading.py", line 6, in <module> import thread ImportError: No module named thread % So, is this an "expected skip" or not? Bill
I can't seem to run the regression tests in a --without-threads build. Might be interesting to configure a buildbot this way to keep ourselves honest.
Because regrtest.py was importing test_socket_ssl without catching the ImportError exception:
If that is the reason you cannot run it, then it seems it works just fine. There is nothing wrong with tests getting skipped.
So, is this an "expected skip" or not?
No. IIUC, "expected skips" are a platform property. For your platform, support for threads is expected (whatever your platform is as log as it was built in this millenium). Regards, Martin
Because regrtest.py was importing test_socket_ssl without catching the ImportError exception:
If that is the reason you cannot run it, then it seems it works just fine. There is nothing wrong with tests getting skipped.
It wasn't getting skipped, it was crashing the regression testing harness. test_unittest catches the ImportError, but this was imported directly from regrtest.py.
So, is this an "expected skip" or not?
No. IIUC, "expected skips" are a platform property. For your platform, support for threads is expected (whatever your platform is as log as it was built in this millenium).
OK. I'll put in a check for this. In fact, here's a patch: Index: Lib/test/regrtest.py =================================================================== --- Lib/test/regrtest.py (revision 58052) +++ Lib/test/regrtest.py (working copy) @@ -1108,7 +1108,6 @@ class _ExpectedSkips: def __init__(self): import os.path - from test import test_socket_ssl from test import test_timeout self.valid = False @@ -1122,8 +1121,13 @@ if not os.path.supports_unicode_filenames: self.expected.add('test_pep277') - if test_socket_ssl.skip_expected: - self.expected.add('test_socket_ssl') + try: + from test import test_socket_ssl + except ImportError: + pass + else: + if test_socket_ssl.skip_expected: + self.expected.add('test_socket_ssl') if test_timeout.skip_expected: self.expected.add('test_timeout') Bill
Might expected skips instead be based on your current configuration instead of what someone statically decided what would be appropriate for your platform? Every new release I have to go through the 'unexpected skips' to determine that they're perfectly fine for how I configured python. It seems that we ought to provide a mechanism for querying python for how the build was configured (although for non-unittest cases, failing to import some modules is usually sufficient information - knowing why they fail probably doesn't matter) On 9/8/07, "Martin v. Löwis" <martin@v.loewis.de> wrote:
I can't seem to run the regression tests in a --without-threads build. Might be interesting to configure a buildbot this way to keep ourselves honest.
Because regrtest.py was importing test_socket_ssl without catching the ImportError exception:
If that is the reason you cannot run it, then it seems it works just fine. There is nothing wrong with tests getting skipped.
So, is this an "expected skip" or not?
No. IIUC, "expected skips" are a platform property. For your platform, support for threads is expected (whatever your platform is as log as it was built in this millenium).
Regards, Martin _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/nick.bastin%40gmail.com
On Sat, Sep 08, 2007, "Martin v. L?wis" wrote:
No. IIUC, "expected skips" are a platform property. For your platform, support for threads is expected (whatever your platform is as log as it was built in this millenium).
Really? I thought NetBSD was still iffy WRT threading. -- Aahz (aahz@pythoncraft.com) <*> http://www.pythoncraft.com/ "Many customs in this life persist because they ease friction and promote productivity as a result of universal agreement, and whether they are precisely the optimal choices is much less important." --Henry Spencer http://www.lysator.liu.se/c/ten-commandments.html
No. IIUC, "expected skips" are a platform property. For your platform, support for threads is expected (whatever your platform is as log as it was built in this millenium).
Really? I thought NetBSD was still iffy WRT threading.
Ah, right. Still, it seems that people expect that thread support is available on NetBSD. The list of expected skips does not mention test_thread for 'netbsd3' (it only does so for 'sco_sv3' and 'riscos') Regards, Martin
On Tue, Sep 11, 2007, "Martin v. L?wis" wrote:
No. IIUC, "expected skips" are a platform property. For your platform, support for threads is expected (whatever your platform is as log as it was built in this millenium).
Really? I thought NetBSD was still iffy WRT threading.
Ah, right. Still, it seems that people expect that thread support is available on NetBSD. The list of expected skips does not mention test_thread for 'netbsd3' (it only does so for 'sco_sv3' and 'riscos')
I'm assuming that's because NetBSD has threads, they just don't work. So we don't want that to put NetBSD on the list of expected skips so that we find out when threads do work. -- Aahz (aahz@pythoncraft.com) <*> http://www.pythoncraft.com/ "Many customs in this life persist because they ease friction and promote productivity as a result of universal agreement, and whether they are precisely the optimal choices is much less important." --Henry Spencer http://www.lysator.liu.se/c/ten-commandments.html
participants (4)
-
"Martin v. Löwis" -
Aahz -
Bill Janssen -
Nicholas Bastin