[issue16935] unittest should understand SkipTest at import time during test discovery

2017-06-30 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: -pitrou ___ Python tracker ___ ___ Python-bugs-list

[issue16935] unittest should understand SkipTest at import time during test discovery

2017-06-30 Thread STINNER Victor
STINNER Victor added the comment: New changeset 22d4e8fb99b16657eabfe7f9fee2d40a5ef882f6 by Victor Stinner in branch '3.6': bpo-30813: Fix unittest when hunting refleaks (#2502) (#2505) https://github.com/python/cpython/commit/22d4e8fb99b16657eabfe7f9fee2d40a5ef882f6 --

[issue16935] unittest should understand SkipTest at import time during test discovery

2017-06-30 Thread STINNER Victor
STINNER Victor added the comment: New changeset 714afccf6e7644d21ce1a39e90bf83cb0c9a74f1 by Victor Stinner in branch '3.5': bpo-30813: Fix unittest when hunting refleaks (#2502) (#2506) https://github.com/python/cpython/commit/714afccf6e7644d21ce1a39e90bf83cb0c9a74f1 --

[issue16935] unittest should understand SkipTest at import time during test discovery

2017-06-30 Thread STINNER Victor
Changes by STINNER Victor : -- pull_requests: +2576 ___ Python tracker ___ ___

[issue16935] unittest should understand SkipTest at import time during test discovery

2017-06-30 Thread STINNER Victor
Changes by STINNER Victor : -- pull_requests: +2572 ___ Python tracker ___ ___

[issue16935] unittest should understand SkipTest at import time during test discovery

2017-06-30 Thread STINNER Victor
STINNER Victor added the comment: New changeset e4f9a2d2be42d5a2cdd624f8ed7cdf5028c5fbc3 by Victor Stinner in branch 'master': bpo-30813: Fix unittest when hunting refleaks (#2502) https://github.com/python/cpython/commit/e4f9a2d2be42d5a2cdd624f8ed7cdf5028c5fbc3 -- nosy: +haypo

[issue16935] unittest should understand SkipTest at import time during test discovery

2017-06-30 Thread STINNER Victor
Changes by STINNER Victor : -- pull_requests: +2565 ___ Python tracker ___ ___

[issue16935] unittest should understand SkipTest at import time during test discovery

2013-03-01 Thread Roundup Robot
Roundup Robot added the comment: New changeset 61ce6deb4577 by Ezio Melotti in branch 'default': #16935: unittest now counts the module as skipped if it raises SkipTest, instead of counting it as an error. Patch by Zachary Ware. http://hg.python.org/cpython/rev/61ce6deb4577 -- nosy:

[issue16935] unittest should understand SkipTest at import time during test discovery

2013-03-01 Thread Ezio Melotti
Ezio Melotti added the comment: Applied, thanks for the patch! SkipTest should probably be documented, but that's a separate issue :) -- assignee: michael.foord - ezio.melotti keywords: -gsoc resolution: - fixed stage: test needed - committed/rejected status: open - closed

[issue16935] unittest should understand SkipTest at import time during test discovery

2013-03-01 Thread Roundup Robot
Roundup Robot added the comment: New changeset 22b6b59c70e6 by Ezio Melotti in branch 'default': #16935: update test_crypt now that unittest discover understands SkipTest. http://hg.python.org/cpython/rev/22b6b59c70e6 -- ___ Python tracker

[issue16935] unittest should understand SkipTest at import time during test discovery

2013-02-27 Thread Ezio Melotti
Ezio Melotti added the comment: LGTM. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16935 ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue16935] unittest should understand SkipTest at import time during test discovery

2013-02-25 Thread Zachary Ware
Zachary Ware added the comment: Thanks for the review, Ezio. I've made some changes and here's the new patch. -- Added file: http://bugs.python.org/file29237/issue16935.v3.diff ___ Python tracker rep...@bugs.python.org

[issue16935] unittest should understand SkipTest at import time during test discovery

2013-02-11 Thread Zachary Ware
Zachary Ware added the comment: Sure can. With a little luck, I'll have the patch ready later today; with less luck it'll be sometime later this week. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16935

[issue16935] unittest should understand SkipTest at import time during test discovery

2013-02-11 Thread Zachary Ware
Zachary Ware added the comment: I think this patch should cover the test and Doc changes necessary. Of course, let me know if it doesn't :) -- Added file: http://bugs.python.org/file29039/issue16935.v2.diff ___ Python tracker rep...@bugs.python.org

[issue16935] unittest should understand SkipTest at import time during test discovery

2013-02-10 Thread Michael Foord
Michael Foord added the comment: The patch looks good - can you add a test and documentation for this? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16935 ___

[issue16935] unittest should understand SkipTest at import time during test discovery

2013-01-28 Thread Zachary Ware
Zachary Ware added the comment: Here's a patch that I believe nicely handles the raising of unittest.SkipTest at module level while doing test discovery. It adds a _make_skipped_test function to unittest.loader, and an ``except case.SkipTest`` clause to TestLoader._find_tests. For our own

[issue16935] unittest should understand SkipTest at import time during test discovery

2013-01-14 Thread Antoine Pitrou
Antoine Pitrou added the comment: Still, raising SkipTest from the toplevel is useful when some toplevel setup code otherwise depends on the missing module. -- nosy: +pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16935

[issue16935] unittest should understand SkipTest at import time during test discovery

2013-01-14 Thread Zachary Ware
Zachary Ware added the comment: I agree that raising SkipTest (or subclasses thereof, such as ResourceDenied) at module level should be supported. That would mean no changes would be needed in most of the should-be-skipped-but-fail-instead tests listed in issue 16748 to make test discovery

[issue16935] unittest should understand SkipTest at import time during test discovery

2013-01-14 Thread Andrew Svetlov
Changes by Andrew Svetlov andrew.svet...@gmail.com: -- nosy: +asvetlov ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16935 ___ ___

[issue16935] unittest should understand SkipTest at import time during test discovery

2013-01-13 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com: -- nosy: +Arfrever ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16935 ___

[issue16935] unittest should understand SkipTest at import time during test discovery

2013-01-13 Thread Chris Jerdonek
Chris Jerdonek added the comment: Without the proposed enhancement, you could also combine Éric's approach with the original patch by doing something like: try: support.import_module(module) except SkipTest: module = None def setUpModule(): if module is None: raise

[issue16935] unittest should understand SkipTest at import time during test discovery

2013-01-13 Thread Chris Jerdonek
Chris Jerdonek added the comment: Should be: module = support.import_module('module') -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16935 ___

[issue16935] unittest should understand SkipTest at import time during test discovery

2013-01-11 Thread Brett Cannon
New submission from Brett Cannon: For test discovery to work where a dependent module is optional, you end up needing to do something like what is done in http://hg.python.org/cpython/rev/15ddd683c321: -crypt = support.import_module('crypt') +def setUpModule(): +# this import will raise

[issue16935] unittest should understand SkipTest at import time during test discovery

2013-01-11 Thread Michael Foord
Michael Foord added the comment: Agreed and it should be easy to implement. -- keywords: +gsoc ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16935 ___

[issue16935] unittest should understand SkipTest at import time during test discovery

2013-01-11 Thread Zachary Ware
Changes by Zachary Ware zachary.w...@gmail.com: -- nosy: +zach.ware ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16935 ___ ___ Python-bugs-list

[issue16935] unittest should understand SkipTest at import time during test discovery

2013-01-11 Thread Éric Araujo
Éric Araujo added the comment: FTR there is already an alternative to setupmodule: try: import module except ImportError: module = None @unittest.skipUnless(module, 'requires module') class ModuleTests(unittest.TestCase): pass This idiom is more lines than support.import_module,

[issue16935] unittest should understand SkipTest at import time during test discovery

2013-01-11 Thread Ezio Melotti
Ezio Melotti added the comment: FWIW the difference between support.import_module and the try/except/skip is that usually the former is used when *all* the tests require the imported module, whereas the latter is used when only some of the tests requires it. -- nosy: +ezio.melotti