[issue5679] cleanUp stack for unittest

2009-04-05 Thread Robert Collins
Robert Collins added the comment: On Sun, 2009-04-05 at 23:49 +, Michael Foord wrote: > > > As an interesting data point, the Bzr code does clean ups *before* > tearDown. No it doesn't: We subclass unittest.TestCase. We also override run() to make tearDown run alway

[issue5679] cleanUp stack for unittest

2009-04-05 Thread Robert Collins
Robert Collins added the comment: On Sun, 2009-04-05 at 23:57 +, Michael Foord wrote: > Michael Foord added the comment: > > My apologies - the jml code on launchpad runs clean ups before taerDown. > > http://bazaar.launchpad.net/~jml/testtools/trunk/annotate/he

[issue5728] Support telling TestResult objects a test run has finished

2009-04-09 Thread Robert Collins
New submission from Robert Collins : Original mail: JML's testtools has a TestResult subclass with a done() method. The reason for this method is to allow doing things after the last test has run. While a result can infer 'first test' it can't infer 'last test'

[issue5728] Support telling TestResult objects a test run has finished

2009-04-09 Thread Robert Collins
Robert Collins added the comment: Now, some refinements, as usual (for me at least) when considering a feature like this from an upstream perspective, where one's immediate use cases are just special cases not general case, I've come up with some refinements. Firstly, I said you

[issue5728] Support telling TestResult objects a test run has finished

2009-04-11 Thread Robert Collins
Robert Collins added the comment: I've written up a patch for this; it works with old result classes too. Hopefully the bugtracker will attach it in reply to this mail; if not I'll put in via the webui this evening. -Rob -- keywords: +patch Added file: http://bugs.

[issue5728] Support telling TestResult objects a test run has finished

2009-04-15 Thread Robert Collins
Robert Collins added the comment: On Wed, 2009-04-15 at 23:19 +, Barry A. Warsaw wrote: > Barry A. Warsaw added the comment: > > The patch looks fine to me, except that it's missing documentation > updates. The feature and names are fine too. Where do t

[issue5728] Support telling TestResult objects a test run has finished

2009-04-16 Thread Robert Collins
Robert Collins added the comment: Updates - docs, and fixes a couple of stubbed out upcalls in the logging result put in while bootsrapping. -- Added file: http://bugs.python.org/file13709/start-stop-TestRun.patch ___ Python tracker <h

[issue5679] cleanUp stack for unittest

2009-04-25 Thread Robert Collins
Robert Collins added the comment: On Sat, 2009-04-25 at 23:17 +, Michael Foord wrote: > Michael Foord added the comment: > > Proper patch and proper issue this time! Not my evening. > > -- > Added file: http://bugs.python.org/file13787/unittest-no-exit.patch D

[issue5804] Add an 'offset' argument to zlib.decompress

2009-05-10 Thread Robert Collins
Robert Collins added the comment: Maybe I'm missing something, but isn't the offset parameter just another way of spelling buffer(input, offset)? I like the avoiding of copying, just wondering if having a magic parameter to get a tuple is really better than (say) re

[issue5804] Add an 'offset' argument to zlib.decompress

2009-05-11 Thread Robert Collins
Robert Collins added the comment: Well, I think its relatively uncommon to be doing such a loop with a static buffer anyway - often you'll instead be reading from disk or a network stream; if we could make those cases simpler and avoid copying that would be great. Anyhow, no strong opi

[issue9216] FIPS support for hashlib

2017-01-16 Thread Robert Collins
Robert Collins added the comment: A few thoughts; usedforsecurity=xxx seems awkward: I wouldn't want, as a user of hashlib, to have to put that in literally every use I make of it. If I understand the situation correctly, the goal is for both linters, and at runtime, identification o

[issue9216] FIPS support for hashlib

2017-01-17 Thread Robert Collins
Robert Collins added the comment: @doug - I don't see how a separate fips module *wouldn't* solve it: - code that uses md5 in security contexts wouldn't be able to call it from the fips module, which is the needed outcome - code that uses md5 and isn't fips compliant wou

[issue27198] Adding an assertClose() method to unittest.TestCase

2016-06-03 Thread Robert Collins
Robert Collins added the comment: Thanks for proposing this. I really don't want to add new assertions to unittest, and I certainly don't want to add narrow usage ones like this, nor ones that are confusingly named (this has nothing to do with files, but 'close' is a verb

[issue27197] mock.patch interactions with "from" imports

2016-06-03 Thread Robert Collins
Robert Collins added the comment: So its a feature of mock that it can mock a module that doesn't exist. And the semantics of the import system are designed to be very cheap when a module is already imported - so when 'patchbug.a' is in sys.modules, import will correctly return

[issue27152] Additional assert methods for unittest

2016-06-03 Thread Robert Collins
Robert Collins added the comment: I'm fine with these as a mixin - they are all very generic and unambiguously named. I'd marginally prefer the opt-in mixin over adding them to the base class. Ideally they'd be matchers, but since I haven't ported that upstream yet, th

[issue27198] Adding an assertClose() method to unittest.TestCase

2016-06-03 Thread Robert Collins
Robert Collins added the comment: Future direction: hamcrest style matchers. You can read more about them in the context of unittest https://rbtcollins.wordpress.com/2010/05/10/maintainable-pyunit-test-suites/ and http://testtools.readthedocs.io/en/latest/for-test-authors.html#matchers

[issue27341] mock.patch decorating a generator returns a regular function.

2016-06-17 Thread Robert Collins
Robert Collins added the comment: There are two related things here. Firstly, the generator's body will run without the patch (because the wrapping function has try: return decorated(..) finally: unpwatch() Secondly, the wrapping function is itself not a generator, and anything

[issue27341] mock.patch decorating a generator returns a regular function.

2016-06-17 Thread Robert Collins
Robert Collins added the comment: Once fixed in CPython, we'll put the backport in mock, for folk using older Python's. -- versions: -Python 2.7, Python 3.2, Python 3.3, Python 3.4 ___ Python tracker <http://bugs.python.o

[issue27198] Adding an assertClose() method to unittest.TestCase

2016-06-21 Thread Robert Collins
Robert Collins added the comment: Chris, I suggested altering assertAlmostEqual in http://bugs.python.org/issue27198#msg267187 :) - I took your agreement with that as a good thing and didn't reply because I had nothing more to add. IMO the status of this issue is as you indicated: you n

[issue27348] traceback (and threading) drops exception message

2016-06-29 Thread Robert Collins
Robert Collins added the comment: hmm, can you give me a change to page this in? I'm pretty sure I saw breakage in external libraries prompting me to add the test and fix. I'd rather not recause that. -- ___ Python tracker <http://bu

[issue17401] io.FileIO closefd parameter is not documented nor shown in repr

2013-03-11 Thread Robert Collins
New submission from Robert Collins: the docs (http://docs.python.org/3.x/library/io.html#io.FileIO) do not document closefd, and AFAICT it isn't possible to tell if closefd is set after the object is created. Specifically it does not show up in the repr(). >>> import sys

[issue17404] ValueError: can't have unbuffered text I/O for io.open(1, 'wt', 0)

2013-03-12 Thread Robert Collins
New submission from Robert Collins: The io library rejects unbuffered text I/O, but this is not documented - and in fact can be manually worked around: binstdout = io.open(sys.stdout.fileno(), 'wt', 0) sys.stdout = io.TextIOWrapper(binstdout, encoding=sys.stdout.encoding)

[issue17404] ValueError: can't have unbuffered text I/O for io.open(1, 'wt', 0)

2013-03-12 Thread Robert Collins
Robert Collins added the comment: Huh, I didn't realise idna would retain data! But that will still be within the TextIOWrapper itself, right? And a stream opened 'wt' cannot be read from anyway, so the read1 limitation

[issue11664] Add patch method to unittest.TestCase

2014-10-12 Thread Robert Collins
Robert Collins added the comment: FWIW I'd really like to be reducing the TestCase API not extending it - particularly since there are lots of good convenient ways of doing this already (not least mock.patch/mock.patch.object). So I'm -0.5 on adding this, as I don't see it add

[issue16662] load_tests not invoked in package/__init__.py

2014-10-17 Thread Robert Collins
Robert Collins added the comment: Closing as the fix to the test suite is applied. -- resolution: -> fixed status: open -> closed ___ Python tracker <http://bugs.python.org/i

[issue22663] patchcheck alters content of .png files

2014-10-17 Thread Robert Collins
New submission from Robert Collins: cpython.hg$ make patchcheck ./python ./Tools/scripts/patchcheck.py Getting the list of files that have been added/changed ... 448 files Fixing whitespace ... 0 files Fixing C file whitespace ... 5 files: Include/patchlevel.h Modules/_ctypes/callbacks.c

[issue16079] list duplicate test names with patchcheck

2014-10-17 Thread Robert Collins
Robert Collins added the comment: FWIW testtools rejects test suites with duplicate test ids; I'm considering adding that feature into unittest itself. We'd need an option to make it warn rather than error I think, but if we did that we wouldn't need a separate script at all.

[issue22457] load_tests not invoked in root __init__.py when start=package root

2014-10-19 Thread Robert Collins
Changes by Robert Collins : Removed file: http://bugs.python.org/file36716/issue22457.diff ___ Python tracker <http://bugs.python.org/issue22457> ___ ___ Python-bug

[issue22457] load_tests not invoked in root __init__.py when start=package root

2014-10-19 Thread Robert Collins
Robert Collins added the comment: Updated patch. -- Added file: http://bugs.python.org/file36973/issue22457.patch ___ Python tracker <http://bugs.python.org/issue22

[issue17401] io.FileIO closefd parameter is not documented nor shown in repr

2014-10-19 Thread Robert Collins
Changes by Robert Collins : -- resolution: -> fixed status: open -> closed ___ Python tracker <http://bugs.python.org/issue17401> ___ ___ Python-bugs-list

[issue7559] TestLoader.loadTestsFromName swallows import errors

2014-10-19 Thread Robert Collins
Changes by Robert Collins : Added file: http://bugs.python.org/file36974/issue7559.patch ___ Python tracker <http://bugs.python.org/issue7559> ___ ___ Python-bugs-list m

[issue7559] TestLoader.loadTestsFromName swallows import errors

2014-10-19 Thread Robert Collins
Robert Collins added the comment: Patch polished up and updated - ready for review IMO. -- ___ Python tracker <http://bugs.python.org/issue7559> ___ ___ Python-bug

[issue22673] Incorrect fileno for CONOUT$ / stdout

2014-10-19 Thread Robert Collins
Robert Collins added the comment: I think its worth a note that the stdio streams are constructed specially, even with the repr improvements. -- nosy: +rbcollins ___ Python tracker <http://bugs.python.org/issue22

[issue17401] io.FileIO closefd parameter is not documented nor shown in repr

2014-10-20 Thread Robert Collins
Robert Collins added the comment: Yeah thats nicer. I'll apply that later unless you can. -- ___ Python tracker <http://bugs.python.org/issue17401> ___ ___

[issue17401] io.FileIO closefd parameter is not documented nor shown in repr

2014-10-20 Thread Robert Collins
Robert Collins added the comment: Showing it only when False would have higher cognitive load. Showing it always is simple and clear. -- ___ Python tracker <http://bugs.python.org/issue17

[issue19217] Calling assertEquals for moderately long list takes too long

2014-10-23 Thread Robert Collins
Robert Collins added the comment: A few thoughts. Adding a new public symbol seems inappropriate here: this is a performance issue that is well predictable and we should cater for that (given difflibs current performance). I'll note in passing that both bzr and hg have much h

[issue10548] Error in setUp not reported as expectedFailure (unittest)

2014-10-23 Thread Robert Collins
Robert Collins added the comment: Just to note that unittest2 tip (unreleased)had michaels proposed fix, which is different to that here. I'm going to back that out before doing a release, because they should be harmonisious. -- nosy: +rbco

[issue10548] Error in setUp not reported as expectedFailure (unittest)

2014-10-23 Thread Robert Collins
Robert Collins added the comment: My take on this, FWIW, is that any methods in the under-test API - setUp, tearDown, test_* and anything registered via addCleanup should all support the same protocol as much as possible, whatever it is. That is, raising a skip in setUp should skip the test

[issue10548] Error in setUp not reported as expectedFailure (unittest)

2014-10-23 Thread Robert Collins
Robert Collins added the comment: I'd argue for - An error - its not covered by the decorator. - An error - the last two are not covered by the decorator. - An error - the last two are not covered by the decorator. - An error - the exception isn't a 'failure' [today - we

[issue19217] Calling assertEquals for moderately long list takes too long

2014-10-23 Thread Robert Collins
Robert Collins added the comment: Oh, I got a profile from the test case for my own interest. 6615 seconds .. some highlights that jumped out at me 200010.1270.000 6610.0250.330 difflib.py:868(compare) which means we're basically using ndiff, which is cubic rather

[issue7559] TestLoader.loadTestsFromName swallows import errors

2014-10-23 Thread Robert Collins
Robert Collins added the comment: Thanks for the review, updated patch here - I'll let this sit for a day or two for more comments then commit it Monday. -- Added file: http://bugs.python.org/file37002/issue7559.patch ___ Python tracker

[issue7559] TestLoader.loadTestsFromName swallows import errors

2014-10-27 Thread Robert Collins
Robert Collins added the comment: I've updated the patch to try and address the niggling clarity issues from the review. Please let me know what you think (and if I hear nothing I'll commit it as-is since the review was still ok). -- Added file: http://bugs.python.org

[issue10548] Error in setUp not reported as expectedFailure (unittest)

2014-10-27 Thread Robert Collins
Robert Collins added the comment: assertions in setUp are fine IMO. But here's the thing. WHat should this code do? class Demo(unittest.TestCase): def setUp(self): raise Exception('hi') def test_normal(self): # this should NOT be covered by

[issue22153] There is no standard TestCase.runTest implementation

2014-10-28 Thread Robert Collins
Robert Collins added the comment: runTest is part of the current API. I think if we're going to hide it we should do so as part of a deprecation path. (I'm +1 on hiding it). -- ___ Python tracker <http://bugs.python.o

[issue21820] unittest: unhelpful truncating of long strings.

2014-10-28 Thread Robert Collins
Changes by Robert Collins : -- nosy: +rbcollins ___ Python tracker <http://bugs.python.org/issue21820> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue22153] There is no standard TestCase.runTest implementation

2014-10-28 Thread Robert Collins
Robert Collins added the comment: Constructing test case objects directly is part of the protocol, and its needed for framework and extension authors. I've seen folk use runTest, but rarely enough that I think we could deprecate it. My argument is that while its supported we should be

[issue22756] testAssertEqualSingleLine gives poor errors

2014-10-28 Thread Robert Collins
New submission from Robert Collins: found while backporting unittest fixes. The current test fails like so: == FAIL: testAssertEqualSingleLine (unittest2.test.test_case.Test_TestCase

[issue22756] testAssertEqualSingleLine gives poor errors

2014-10-28 Thread Robert Collins
Robert Collins added the comment: There's comments in the test above about 'not testing ourself with ourselves' - but we're testing the rendering of an error case, so its entirely legitimate to use the same method's succe

[issue22756] testAssertEqualSingleLine gives poor errors

2014-10-28 Thread Robert Collins
Changes by Robert Collins : -- keywords: +patch Added file: http://bugs.python.org/file37057/issue22756.patch ___ Python tracker <http://bugs.python.org/issue22

[issue22153] There is no standard TestCase.runTest implementation

2014-10-29 Thread Robert Collins
Robert Collins added the comment: Oh, one thought - in testtools we split out 'docs for test writers' and 'docs for framework folk'. That would facilitate getting runTest out of test writers face while still documenting it appropriately. Related to that is my ongoi

[issue22153] Documentation of TestCase.runTest is incorrect and confusing

2014-10-29 Thread Robert Collins
Changes by Robert Collins : -- title: There is no standard TestCase.runTest implementation -> Documentation of TestCase.runTest is incorrect and confusing ___ Python tracker <http://bugs.python.org/issu

[issue22763] load_tests chaining into discover from non-discover entry point gets top_level_dir wrong

2014-10-29 Thread Robert Collins
New submission from Robert Collins: The following trivial chain-into-discover load_tests: def load_tests(loader, tests, pattern): import os.path # top level directory cached on loader instance this_dir = os.path.dirname(__file__) return loader.discover(start_dir=this_dir, pattern

[issue22457] load_tests not invoked in root __init__.py when start=package root

2014-10-29 Thread Robert Collins
Robert Collins added the comment: Updated patch, after other recent conflicting changes. -- Added file: http://bugs.python.org/file37071/issue22457.patch ___ Python tracker <http://bugs.python.org/issue22

[issue22457] load_tests not invoked in root __init__.py when start=package root

2014-10-29 Thread Robert Collins
Changes by Robert Collins : -- type: -> behavior versions: +Python 3.5 ___ Python tracker <http://bugs.python.org/issue22457> ___ ___ Python-bugs-list mai

[issue22764] object lifetime fragility in unittest tests

2014-10-30 Thread Robert Collins
New submission from Robert Collins: test_assertRaises_frames_survival (unittest2.test.test_assertions.Test_Assertions Depends on refcount behaviour to pass - adding a gc.collect() before the weakref checks is sufficient to fix things on pypy. test_no_exception_leak (unittest2

[issue22764] object lifetime fragility in unittest tests

2014-10-30 Thread Robert Collins
Robert Collins added the comment: Herewith a patch. Applied to unittest2 for backport to unbreak its tests on pypy. -- keywords: +patch Added file: http://bugs.python.org/file37072/issue22764.patch ___ Python tracker <http://bugs.python.

[issue22764] object lifetime fragility in unittest tests

2014-10-30 Thread Robert Collins
Changes by Robert Collins : -- type: -> behavior ___ Python tracker <http://bugs.python.org/issue22764> ___ ___ Python-bugs-list mailing list Unsubscrib

[issue22764] object lifetime fragility in unittest tests

2014-10-30 Thread Robert Collins
Robert Collins added the comment: Hmm? I must have misunderstood the test. Here's my understanding: the test is testing that a an object ref only held in the traceback object of the exception is cleaned up such that it can be collected. In a refcount system that collection is immediate,

[issue22764] object lifetime fragility in unittest tests

2014-10-30 Thread Robert Collins
Robert Collins added the comment: I've done some experimentation. Yes, the updated test passes when the clear_frames call is removed in cPython 3.5 But the original test also passes when clear_frames is not called if one drops into pdb and steps through, which still fits the sympto

[issue22764] object lifetime fragility in unittest tests

2014-10-30 Thread Robert Collins
Changes by Robert Collins : Added file: http://bugs.python.org/file37080/issue22764.patch ___ Python tracker <http://bugs.python.org/issue22764> ___ ___ Python-bugs-list m

[issue22153] Documentation of TestCase.runTest is incorrect and confusing

2014-10-30 Thread Robert Collins
Robert Collins added the comment: I'll apply the patch monday if there are no further comments before then. -- ___ Python tracker <http://bugs.python.org/is

[issue22457] load_tests not invoked in root __init__.py when start=package root

2014-10-30 Thread Robert Collins
Robert Collins added the comment: (Pinging for reviews - I'm going to time out and land this early next week if I can't get a review on it, since this is actually a fairly significant oversight and I don't want unittest2 to run ahead of the stdlib - that way leads unmaint

[issue22457] load_tests not invoked in root __init__.py when start=package root

2014-11-03 Thread Robert Collins
Changes by Robert Collins : Added file: http://bugs.python.org/file37118/issue22457.patch ___ Python tracker <http://bugs.python.org/issue22457> ___ ___ Python-bugs-list m

[issue22794] missing test for issue 22457 regression commit

2014-11-04 Thread Robert Collins
New submission from Robert Collins: I did a brownbag fix for my change to issue22457 which exposed a untested corner case - this issue is for me to come back and add a regression test for it. -- messages: 230628 nosy: rbcollins priority: normal severity: normal status: open title

[issue22680] unittest discovery is fragile

2014-11-04 Thread Robert Collins
Robert Collins added the comment: This was reported as https://code.google.com/p/unittest-ext/issues/detail?id=71 a while back. I think blacklisting FunctionTestCase in TestLoader is entirely reasonable. -- ___ Python tracker <h

[issue7559] TestLoader.loadTestsFromName swallows import errors

2014-11-06 Thread Robert Collins
Robert Collins added the comment: Its backported in unittest2 0.8.0 which is available on pypi for 2.6+ and 3.2+. The changes are large enough that I'd hesitate to backport them in cPython itself. -- ___ Python tracker <http://bugs.py

[issue22811] _top_level_dir state leaks on defaultTestLoader

2014-11-06 Thread Robert Collins
New submission from Robert Collins: TestProgram uses defaultTestLoader to load tests. Calling discover() on a TestLoader sets _top_level_dir. Calling discover with no top_level_dir implictly sets _top_level_dir but only the first time: the second time it is called with a different start_dir

[issue22811] _top_level_dir state leaks on defaultTestLoader

2014-11-06 Thread Robert Collins
Changes by Robert Collins : -- components: +Library (Lib) versions: +Python 3.5 ___ Python tracker <http://bugs.python.org/issue22811> ___ ___ Python-bugs-list m

[issue22452] addTypeEqualityFunc is not used in assertListEqual

2014-11-07 Thread Robert Collins
Robert Collins added the comment: https://code.google.com/p/unittest-ext/issues/detail?id=11 I think that the hamcrest inspired matchers stuff may help make this a reality too. OTOH if we had a clean patch now for the existing asserts that would be fine too

[issue22812] Documentation of unittest -p usage wrong on windows.

2014-11-07 Thread Robert Collins
New submission from Robert Collins: >From https://code.google.com/p/unittest-ext/issues/detail?id=13 The following is incorrect on Windows: python -m unittest discover -p '*.py' It should be without the single quotes around the .py: python -m unittest discover -p *.py

[issue22813] No facility for test randomisation

2014-11-07 Thread Robert Collins
New submission from Robert Collins: Unittest doesn't support a test randomisation feature. Such a feature should support: - passing in a seed (to allow reproducing the order for debugging) - preserving the suite hierarchy, to preserve class and module setUp performance optimisations

[issue22814] TestProgram loading fails when a script is used

2014-11-07 Thread Robert Collins
New submission from Robert Collins: If someone has a TestProgram script - e.g. the unit2 script in unittest2, loading a module in cwd will fail, because the PYTHONPATH doesn't include '.'. We might want to consider adding cwd to the PYTHONPATH in TestProgram. >From https:/

[issue22815] unexpected successes are not output

2014-11-07 Thread Robert Collins
New submission from Robert Collins: Unexpected successes cause failures, but we don't output details about them at the end of the run. >From https://code.google.com/p/unittest-ext/issues/detail?id=22 A complicating factor is that we don't have a backtrace to show - but we may

[issue22452] addTypeEqualityFunc is not used in assertListEqual

2014-11-07 Thread Robert Collins
Robert Collins added the comment: See also https://code.google.com/p/unittest-ext/issues/detail?id=27 "Sorry, wrong wording of the bug. I tested this on IronPython 2.6.1 and 2.7.b1. I see the same result as you and I consider the following wrong or at least misleading: - [1, Decim

[issue10611] sys.exit() in a test causes a test run to die

2014-11-07 Thread Robert Collins
Robert Collins added the comment: Hmm, so testtools went in a different direction here - the same unification stuff, but see https://github.com/testing-cabal/testtools/commit/18bc5741cf277f7a0d601568be6dccacc7b0783c tl;dr - I think unittest should not prevent this causing the process to exit

[issue10548] document (lack of) interaction between @expectedException on a test_method and setUp

2014-11-07 Thread Robert Collins
Changes by Robert Collins : -- title: Error in setUp not reported as expectedFailure (unittest) -> document (lack of) interaction between @expectedException on a test_method and setUp ___ Python tracker <http://bugs.python.org/issu

[issue22431] Change format of test runner output

2014-11-07 Thread Robert Collins
Robert Collins added the comment: I don't consider the console output of unittest to be a stable interface. Michael - do you? Things that want to process unittest should be using the API. -- nosy: +rbcollins ___ Python tracker

[issue22812] Documentation of unittest -p usage wrong on windows.

2014-11-07 Thread Robert Collins
Robert Collins added the comment: I agree. IIRC the windows shell passes the argument as "'*.py'" rather than as "*.py", so when we glob it we get no files, as no python files end with an apostrophe. -- ___ Python tr

[issue19645] decouple unittest assertions from the TestCase class

2014-11-07 Thread Robert Collins
Robert Collins added the comment: Hi, I'm glad you're interested in this. I very much want to see a matcher/hamcrest approach rather than a library of assertions per se - because match-or-except makes layering things harder. -- ___ Pyth

[issue11664] Add patch method to unittest.TestCase

2014-11-07 Thread Robert Collins
Robert Collins added the comment: +1 on a plain function or context manager. w.r.t. addCleanUp taking a context manager, that could be interesting - perhaps we'd want a thing where you pass it the context manager, it __enter__'s the manager and then calls addClean

[issue22813] No facility for test randomisation

2014-11-07 Thread Robert Collins
Robert Collins added the comment: b) -- ___ Python tracker <http://bugs.python.org/issue22813> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue22431] Change format of test runner output

2014-11-13 Thread Robert Collins
Robert Collins added the comment: Yes, making customising the output easier is a good thing. One way is to use e.g. subunit.run (which can work with all unittest versions since 2.6) and write a custom filter. Or a custom TestResult and TextTestRunner can work too

[issue22858] unittest.__init__:main shadows unittest.main

2014-11-13 Thread Robert Collins
New submission from Robert Collins: This is just an ugly/hygiene thing. Since we've never advertised the submodules as the API, we should be able to fix this by moving main.py to e.g. __main__.py. -- messages: 231101 nosy: rbcollins priority: normal severity: normal status: open

[issue22858] unittest.__init__:main shadows unittest.main

2014-11-13 Thread Robert Collins
Changes by Robert Collins : -- components: +Library (Lib) type: -> behavior versions: +Python 3.5 ___ Python tracker <http://bugs.python.org/issue22858> ___ _

[issue22859] unittest.TestProgram.usageExit no longer invoked

2014-11-13 Thread Robert Collins
New submission from Robert Collins: Before the argparse migration usageExit was invoked and could be extended via subclasses, but it no longer is. We could delete it (and document it being no longer accessible) or put some glue in to reinstate it. I think deleting it is fine, as long as we

[issue22859] unittest.TestProgram.usageExit no longer invoked

2014-11-13 Thread Robert Collins
Changes by Robert Collins : -- components: +Library (Lib) type: -> behavior versions: +Python 3.5 ___ Python tracker <http://bugs.python.org/issue22859> ___ _

[issue22860] unittest TestProgram hard to extend

2014-11-13 Thread Robert Collins
New submission from Robert Collins: Some users of TestProgram would like to add options (e.g. testtools.run adds --list and --load-list) but there isn't a clean point to add them without bulk copying the implementation around. We likely need some extra extension points as well

[issue22886] TestProgram leaves defaultTestLoader.errors dirty

2014-11-16 Thread Robert Collins
New submission from Robert Collins: TestProgram leaves defaultTestLoader.errors dirty. This primarily affects tests but it would be good hygiene to clear it at the end of TestProgram. -- components: Library (Lib) messages: 231261 nosy: rbcollins priority: normal severity: normal status

[issue22936] traceback module has no way to show locals

2014-11-24 Thread Robert Collins
New submission from Robert Collins: >From https://github.com/testing-cabal/testtools/issues/111 - any code that is >data dependent can be hard to diagnose from a backtrace alone. Many unittest >and server environments address this by doing custom tracebacks that include >locals.

[issue22936] traceback module has no way to show locals

2014-11-24 Thread Robert Collins
Changes by Robert Collins : -- type: -> enhancement ___ Python tracker <http://bugs.python.org/issue22936> ___ ___ Python-bugs-list mailing list Unsubscrib

[issue22937] unittest errors can't show locals

2014-11-24 Thread Robert Collins
New submission from Robert Collins: >From https://github.com/testing-cabal/testtools/issues/111 - any code that is >data dependent can be hard to diagnose from a backtrace alone. Many unittest >and server environments address this by doing custom tracebacks that include >locals.

[issue22936] traceback module has no way to show locals

2014-11-24 Thread Robert Collins
Robert Collins added the comment: See http://bugs.python.org/issue22936 for the unittest aspect of this. -- ___ Python tracker <http://bugs.python.org/issue22

[issue17911] traceback: add a new thin class storing a traceback without storing local variables

2014-11-27 Thread Robert Collins
Robert Collins added the comment: I'll put something together. -- nosy: +rbcollins ___ Python tracker <http://bugs.python.org/issue17911> ___ ___ Pytho

[issue12681] unittest expectedFailure could take a message argument like skip does

2015-01-02 Thread Robert Collins
Changes by Robert Collins : -- nosy: +rbcollins ___ Python tracker <http://bugs.python.org/issue12681> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue17911] traceback: add a new thin class storing a traceback without storing local variables

2015-01-12 Thread Robert Collins
Robert Collins added the comment: w.r.t. a new linecache interface, it looks like we need two attributes from f_globals: __name__ and __loader__, so that we can eventually call __loader__.get_source(__name__). One small change (to let me focus on traceback) would be to add another kw

[issue17911] traceback: add a new thin class storing a traceback without storing local variables

2015-01-13 Thread Robert Collins
Robert Collins added the comment: Ok, here's a draft patch for linecache. Next up, poking around the new TB API. -- Added file: http://bugs.python.org/file37700/linecache_1.patch ___ Python tracker <http://bugs.python.org/is

[issue17911] traceback: add a new thin class storing a traceback without storing local variables

2015-01-18 Thread Robert Collins
Robert Collins added the comment: One thing I noticed while working on this, traceback today stats each included file once per frame per call into e.g. format_list. This might actually account for quite some of the overhead. I'll include an optimisation for this in my new API.

[issue17911] traceback: add a new thin class storing a traceback without storing local variables

2015-01-18 Thread Robert Collins
Robert Collins added the comment: This is a WIP patch, including it to just share progress. -- Added file: http://bugs.python.org/file37770/frame_1.patch ___ Python tracker <http://bugs.python.org/issue17

[issue17911] traceback: add a new thin class storing a traceback without storing local variables

2015-01-18 Thread Robert Collins
Changes by Robert Collins : Added file: http://bugs.python.org/file37769/linecache_2.patch ___ Python tracker <http://bugs.python.org/issue17911> ___ ___ Python-bug

[issue17911] traceback: add a new thin class storing a traceback without storing local variables

2015-01-18 Thread Robert Collins
Robert Collins added the comment: And this improves the scaling of the cache stating overhead, but we may well want to fix this more fundamentally - e.g. by linking the cache ownership into the import system somehow, so that when a file is reimported, the cached source is automatically

<    1   2   3   4   5   6   >