[issue12958] test_socket failures on Mac OS X

2011-09-18 Thread Michael Foord
Michael Foord added the comment: See issue 10548. There is some resistance to expectedFailure masking errors in setUp/tearDown as these aren't the place where you would normally expect the expected failure... -- ___ Python tracker

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

2011-09-18 Thread Michael Foord
Michael Foord added the comment: I think Twisted uses the tearDown to fail tests as well. As we have two use cases perhaps we should allow expectedFailure to work with failues in tearDown? (And if we do that it should cover setUp as well for symmetry or it becomes a morass of special cases

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

2011-10-07 Thread Michael Foord
Michael Foord added the comment: Well, it would be nice for the Python test suite, maybe not so useful for external users of the api. Something for regrtest rather than unittest I think. -- ___ Python tracker <http://bugs.python.org/issue12

[issue13241] llvm-gcc-4.2 miscompiles Python (XCode 4.1 on Mac OS 10.7)

2011-11-07 Thread Michael Foord
Michael Foord added the comment: On OS X Lion, with XCode 4.2 installed, I find the following works (no need to install macports): ./configure CC=gcc-4.2 --prefix=/dev/null --with-pydebug -- nosy: +michael.foord ___ Python tracker <h

[issue13241] llvm-gcc-4.2 miscompiles Python (XCode 4.1 on Mac OS 10.7)

2011-11-07 Thread Michael Foord
Michael Foord added the comment: Ah, it seems I have XCode 3.2.6 installed alongside XCode 4.2. -- ___ Python tracker <http://bugs.python.org/issue13241> ___ ___

[issue11812] transient socket failure to connect to 'localhost'

2011-11-08 Thread Michael Foord
Changes by Michael Foord : -- nosy: -michael.foord ___ Python tracker <http://bugs.python.org/issue11812> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue13387] add exact_type argument to assertIsInstance

2011-11-12 Thread Michael Foord
Michael Foord added the comment: I think your proposed workaround is good enough and no extra effort to type than the suggested change to assertIsInstance. -1 on a new method I think the behaviour of isinstance is clear enough that people who misunderstand what assertIsInstance is doing

[issue13241] llvm-gcc-4.2 miscompiles Python (XCode 4.1 on Mac OS 10.7)

2011-11-19 Thread Michael Foord
Michael Foord added the comment: Note that this works for me on a Macbook Air that has never had Snow Leopard, nor XCode 3 installed. As far as I can tell non-llvm gcc *is* installed by XCode 4.2: /usr/bin/gcc-4.2 -- ___ Python tracker <h

[issue10278] add time.wallclock() method

2011-11-25 Thread Michael Foord
Changes by Michael Foord : -- nosy: -michael.foord versions: +Python 3.3 -Python 3.2 ___ Python tracker <http://bugs.python.org/issue10278> ___ ___ Python-bug

[issue13561] os.listdir documentation should mention surrogateescape

2011-12-08 Thread Michael Foord
New submission from Michael Foord : Where os.listdir encounters undecodable bytes from the filesystem it uses the surrogateescape handler. As the resulting strings are invalid they can't be encoded without an errorhandler, and so can't be printed (for example). This should be

[issue11813] inspect.getattr_static doesn't get module attributes

2011-12-18 Thread Michael Foord
Michael Foord added the comment: I'd like to commit this patch. What's your real name Trundle, for the NEWS entry? -- assignee: -> michael.foord ___ Python tracker <http://bugs.pytho

[issue11178] Running tests inside a package by module name fails

2011-12-18 Thread Michael Foord
Michael Foord added the comment: No longer reproducable on CPython. Unfortunately still an issue with unittest2. -- resolution: -> out of date status: open -> closed ___ Python tracker <http://bugs.python.org/i

[issue11764] inspect.getattr_static code execution w/ class body as non dict

2011-12-18 Thread Michael Foord
Changes by Michael Foord : -- resolution: -> invalid status: open -> closed ___ Python tracker <http://bugs.python.org/issue11764> ___ ___ Python-bugs-list

[issue11829] inspect.getattr_static code execution with meta-metaclasses

2011-12-18 Thread Michael Foord
Michael Foord added the comment: Andreas, is this still needed and valid? -- assignee: -> michael.foord ___ Python tracker <http://bugs.python.org/issu

[issue8313] message in unittest tracebacks

2011-12-23 Thread Michael Foord
Michael Foord added the comment: traceback patch looks good. Thanks for the unittest2 patch as well. -- ___ Python tracker <http://bugs.python.org/issue8

[issue13675] IDLE won't open if it can't read recent-files.lst

2011-12-29 Thread Michael Foord
Michael Foord added the comment: Thanks -- resolution: -> duplicate status: open -> closed ___ Python tracker <http://bugs.python.org/issue13675> ___ ___

[issue13675] IDLE won't open if it can't read recent-files.lst

2011-12-29 Thread Michael Foord
New submission from Michael Foord : Reported by a user. Reported on Windows but probably not Windows specific. If IDLE doesn't have permission to read the recent-files.lst file then it crashes. (When launched with pythonw.exe on Windows it silently fails to open with no error message t

[issue12166] object.__dir__

2011-05-24 Thread Michael Foord
New submission from Michael Foord : Implementing a custom __dir__ method is fiddly because there is no way of obtaining the standard list of attributes that dir would return. Moving the relevant parts of the dir implementation into object.__dir__ would allow a custom __dir__ to obtain the

[issue11798] Test cases not garbage collected after run

2011-05-26 Thread Michael Foord
Michael Foord added the comment: Sure, let's do it. Fabio, care to provide patch with tests and doc changes? (For 3.3.) -- ___ Python tracker <http://bugs.python.org/is

[issue11906] test_argparse failure in interactive mode

2011-05-27 Thread Michael Foord
Michael Foord added the comment: Unless Terry wants to contribute a fix I suggest closing this. -- ___ Python tracker <http://bugs.python.org/issue11906> ___ ___

[issue11906] test_argparse failure in interactive mode

2011-05-27 Thread Michael Foord
Michael Foord added the comment: > Interactive mode is an approved method of running Python code, along with > batch mode. That is not guaranteed for any particular piece of Python code in the standard library. In particular it is not amenable to test automation, so it is certainly

[issue11906] test_argparse failure in interactive mode

2011-05-27 Thread Michael Foord
Michael Foord added the comment: > it should run interactively as documented. Where is it documented that all tests will run from the IDLE prompt? I have *never* heard this claim before. I have nothing against tests supporting this, but those who want it to happen will have to do the w

[issue10530] distutils2 should allow the installing of python files with invalid syntax

2011-06-14 Thread Michael Foord
Michael Foord added the comment: Config options are for when developers can't make decisions. Given that there are valid use cases please just allow it. A --strict option is fine... (but no-one will use it I suspect) -- ___ Python tracker

[issue11218] pattern=None when following documentation for load_tests and unittest.main()

2011-06-14 Thread Michael Foord
Changes by Michael Foord : -- assignee: -> michael.foord ___ Python tracker <http://bugs.python.org/issue11218> ___ ___ Python-bugs-list mailing list Unsubscri

[issue10530] distutils2 should allow the installing of python files with invalid syntax

2011-06-14 Thread Michael Foord
Michael Foord added the comment: Yes, allowing it by default. :-) -- ___ Python tracker <http://bugs.python.org/issue10530> ___ ___ Python-bugs-list mailin

[issue12314] regrtest checks (os.environ, sys.path, etc.) are hard to use

2011-06-15 Thread Michael Foord
Michael Foord added the comment: I don't think this is something that belongs in unittest - it's not something particularly useful (or at least particularly requested) outside of the python test suite. No reason that a WatchfulTestRunner couldn't l

[issue12341] Some additions to .hgignore

2011-06-15 Thread Michael Foord
Changes by Michael Foord : -- nosy: +michael.foord ___ Python tracker <http://bugs.python.org/issue12341> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue12370] Use of super overwrites use of __class__ in class namespace

2011-06-19 Thread Michael Foord
New submission from Michael Foord : In Python 3 the following code prints "False" because the use of super() has caused the __class__ descriptor to be omitted from the class namespace. Remove the use of super and it prints "True". class X(object): def __init__(

[issue11763] assertEqual memory issues with large text inputs

2011-06-25 Thread Michael Foord
Michael Foord added the comment: The basic idea of the patch is good, but instead of introducing _MAX_LENGTH, maxDiff should be reused. -- ___ Python tracker <http://bugs.python.org/issue11

[issue11763] assertEqual memory issues with large text inputs

2011-06-25 Thread Michael Foord
Michael Foord added the comment: Sorry, ignore that. I see that the patch already passes maxDiff to truncate_str. -- ___ Python tracker <http://bugs.python.org/issue11

[issue12376] unittest.TextTestResult.__init__ does not pass on its init arguments in super call

2011-06-27 Thread Michael Foord
Michael Foord added the comment: I have a feeling I added the arguments to TestResult.__init__ to allow it to be used as a silent test result directly in place of TextTestResult. I still need to check this. Not adding the arguments to the super call in TextTestResult would have been an

[issue12376] unittest.TextTestResult.__init__ does not pass on its init arguments in super call

2011-06-27 Thread Michael Foord
Changes by Michael Foord : -- assignee: -> michael.foord ___ Python tracker <http://bugs.python.org/issue12376> ___ ___ Python-bugs-list mailing list Unsubscri

[issue7117] Backport py3k float repr to trunk

2011-06-29 Thread Michael Foord
Michael Foord added the comment: Wondered if you guys had heard of some recent advances in the state of the art in this field. I'm sure you have, but thought I'd link it here anywhere. Quote taken from this article (which links to relevant papers): http://www.serpentine.com/blog/

[issue8639] Allow callable objects in inspect.getargspec

2011-07-11 Thread Michael Foord
Michael Foord added the comment: Doesn't seem like an unreasonable request. Nick / Benjamin, what do you think? -- ___ Python tracker <http://bugs.python.org/i

[issue8639] Allow callable objects in inspect.getfullargspec

2011-07-11 Thread Michael Foord
Michael Foord added the comment: I can produce a patch w/ tests and documentation for you to review Nick. -- ___ Python tracker <http://bugs.python.org/issue8

[issue12544] Avoid using a pseudo-dict for _type_equality_funcs in unittest

2011-07-12 Thread Michael Foord
Michael Foord added the comment: It isn't clear to me exactly what fix you are suggesting for Python 2.7? -- assignee: -> michael.foord ___ Python tracker <http://bugs.python.org

[issue7559] TestLoader.loadTestsFromName swallows import errors

2011-07-14 Thread Michael Foord
Michael Foord added the comment: My thinking on this has evolved a bit. Changing an import error into an attribute error is just a bad api. We should just fix the bad api. -- ___ Python tracker <http://bugs.python.org/issue7

[issue12544] Avoid using a pseudo-dict for _type_equality_funcs in unittest

2011-07-15 Thread Michael Foord
Michael Foord added the comment: I wouldn't object to having a cyclic reference test for TestCase, although if it ever becomes a problem for the development of unittest we may have to disable it again. I think Benjamin said he would like to modify the test from Martin&#x

[issue7897] Support parametrized tests in unittest

2011-07-20 Thread Michael Foord
Michael Foord added the comment: *If* we add this to unittest then we need to decide between test load time parameterised tests and test run time parameterisation. Load time is more backwards compatible / easier (all tests can be generated at load time and the number of tests can be known

[issue7897] Support parametrized tests in unittest

2011-07-20 Thread Michael Foord
Michael Foord added the comment: And yes, parameterising test cases is a different issue. bzr does this IIRC. This is easier in some ways, and can be done through load_tests, or any other test load time mechanism. -- ___ Python tracker <h

[issue7897] Support parametrized tests in unittest

2011-07-20 Thread Michael Foord
Michael Foord added the comment: Test selection would require load time parameterisation - although the current test selection mechanism is through importing which would probably *not* work without a specific fix. Same for run time parameterisation. Well how *exactly* you generate the names

[issue7897] Support parametrized tests in unittest

2011-07-20 Thread Michael Foord
Michael Foord added the comment: Dammit, I've reversed my thinking in some of those messages. Load time parameterisation *does* give you separate test reporting. It is run time parameterisation that doesn't. Depending on how you do it (i.e. if the decorator generates the tests and

[issue7897] Support parametrized tests in unittest

2011-07-20 Thread Michael Foord
Michael Foord added the comment: So if we do import time *or* test load time parameterisation then we can do separate failure reporting. We may still want to improve "test selection" for parameterised tests. There are use cases for run time parameterisation (for example genera

[issue7897] Support parametrized tests in unittest

2011-07-20 Thread Michael Foord
Michael Foord added the comment: That all sounds good to me Nick. Some notes / questions. How should parameterised tests be marked? I'm happy with a unittest.parameterized decorator (it would do no work other than mark the test method, with the parameterisation being done in the TestL

[issue7897] Support parametrized tests in unittest

2011-07-20 Thread Michael Foord
Michael Foord added the comment: Oh, and if we're not going to get clever with naming, how is the TestResult going to include the parameter repr in the failure report? That information will have to be stored on the TestCase. I would prefer this feature not to touch the TestResult - s

[issue7897] Support parametrized tests in unittest

2011-07-21 Thread Michael Foord
Michael Foord added the comment: Well, pyflakes will tell you about name clashes within a TestCase (unless you're shadowing a test on a base class which I guess is rarely the case)... When we generate the tests we could add the parameter reprs to the docstring. A decorator factor that

[issue7897] Support parametrized tests in unittest

2011-07-21 Thread Michael Foord
Michael Foord added the comment: Note that name clashes *would* result in non-unique testcase ids, so we need to prevent that. -- ___ Python tracker <http://bugs.python.org/issue7

[issue12600] Support parameterized TestCases in unittest

2011-07-21 Thread Michael Foord
Michael Foord added the comment: Yeah, without some clear advantages and a clean api / implementation I'm -1. -- ___ Python tracker <http://bugs.python.org/is

[issue7897] Support parametrized tests in unittest

2011-07-21 Thread Michael Foord
Michael Foord added the comment: David, I don't understand - it looks like Nick's suggestion would allow you to create a name per case, that's the point of it! You could even do this: def _name_from_case(name, cases): for idx, case in enumerate(cases, start=1): tes

[issue11610] Improved support for abstract base classes with descriptors

2011-07-23 Thread Michael Foord
Changes by Michael Foord : -- nosy: -michael.foord ___ Python tracker <http://bugs.python.org/issue11610> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue12600] Support parameterized TestCases in unittest

2011-07-23 Thread Michael Foord
Michael Foord added the comment: Having a "TestCase factory" would be pretty easy, and solve the scaling problems. For example: def make_testcase_classes(): for backend in backends: yield type( '{}Test'.format(backend.name),

[issue12626] run test cases based on a glob filter

2011-07-24 Thread Michael Foord
Michael Foord added the comment: I love the functionality. Running individual tests (or groups of tests) with unittest is a *pain*. I had hoped to solve this through unittest extensions, but this is taking me longer to get to than I had hoped. So I would like to add this to unittest, but

[issue12626] run test cases based on a glob filter

2011-07-31 Thread Michael Foord
Michael Foord added the comment: I agree with Antoine, as test.support is not a public api adding new features to assist with debugging is fine. -- ___ Python tracker <http://bugs.python.org/issue12

[issue8639] Allow callable objects in inspect.getfullargspec

2011-08-01 Thread Michael Foord
Michael Foord added the comment: Right. For a callable object (instance with __call__ method), it's unambiguous which signature you want. For a class it's ambiguous. -- ___ Python tracker <http://bugs.python.

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

2011-08-02 Thread Michael Foord
Michael Foord added the comment: Well, expectedFailure could dispatch on the type of the argument, with different behaviour for strings and anything else (presumed to be a function / method). That would be inconsistent with the api for skipping though. (I'm not wild on the message arg

[issue7219] Unhelpful error message when a distutils package install fails due to a permissions error

2010-08-11 Thread Michael Foord
Michael Foord added the comment: Output below, first without DISTUTILS_DEBUG (showing the not very useful default message) and second with. (The actual exception is "Access to the path 'C:\Program Files\IronPython 2.7\Lib\site-packages\mock.py' is denied.") This is w

[issue9424] deprecate unittest.TestCase.assertEquals

2010-08-11 Thread Michael Foord
Michael Foord added the comment: We aren't talking about *removing* these methods from unittest - but now that we have standardised on assertEqual for the Python test suite it is annoying (particularly for Ezio who changes) when *new* tests are checked in using the old (deprecated-bu

[issue9424] Disable unittest.TestCase.assertEquals and assert_ during a regrtest run

2010-08-11 Thread Michael Foord
Changes by Michael Foord : -- title: deprecate unittest.TestCase.assertEquals -> Disable unittest.TestCase.assertEquals and assert_ during a regrtest run ___ Python tracker <http://bugs.python.org/iss

[issue9424] Disable unittest.TestCase.assertEquals and assert_ during a regrtest run

2010-08-12 Thread Michael Foord
Michael Foord added the comment: Well, there is *some* value in stylistic consistency. If it didn't matter at all then Guido wouldn't have instigated the deprecation of assertEquals and assert_ and standardised on assertEqual (which he did during the sprints at PyCon 2009). Eithe

[issue9587] unittest.assertRaises() return the raised exception

2010-08-13 Thread Michael Foord
Michael Foord added the comment: If you want the exception then use assertRaises in a with statement. The exception is available as an attribute on the context manager. -- resolution: -> rejected stage: -> committed/rejected status: open -&g

[issue9587] unittest.assertRaises() return the raised exception

2010-08-13 Thread Michael Foord
Michael Foord added the comment: Sorry, it's a reopened bug requesting a feature that has already been considered and rejected previously. Yes I was abrupt, my apologies - I'm trying to clear my backlog before I go away. -- ___ Pyth

[issue7175] Define a standard location and API for configuration files

2010-08-13 Thread Michael Foord
Michael Foord added the comment: It would be nice to settle this. Personally I would like to see the defaults being: Linux: ~/.pythonx.y Mac OS X: ~/.pythonx.y with a fallback of ~/Library/Preferences/.pythonx.y Windows: ~/pythonx.y perhaps with a backup of AppData/pythonx.y For both Windows

[issue7219] Unhelpful error message when a distutils package install fails due to a permissions error

2010-08-14 Thread Michael Foord
Michael Foord added the comment: The "None" error message *looks* to me like the result of a failed assertion. That may not be correct of course... -- ___ Python tracker <http://bugs.python.

[issue9587] unittest.assertRaises() return the raised exception

2010-08-15 Thread Michael Foord
Michael Foord added the comment: Providing access to the exception on the context manager was *precisely* to meet the use case of wanting to make assertions about the exception. I tend to agree with Guido that having one of the asserts return something is a bit odd, but irrespective of that

[issue7501] python -m unittest path_to_suite_function errors

2010-08-22 Thread Michael Foord
Michael Foord added the comment: Well, it was misdiagnosed yes - but asking for "python -m unittest ..." support in Python 2.6 is still a feature request and not a bug report. (So unfortunately it can't be fixed in 2.6 which is bugfix only. The solution is to use unittest

[issue9732] Addition of getattr_static for inspect module

2010-09-01 Thread Michael Foord
New submission from Michael Foord : As discussed on python-dev, a version of getattr that does static lookups - bypassing the descriptor protocol, __getattr__, and __getattribute__. Initial implementation by Nick Coghlan, amended and tests added by me. Phillip Eby objects to this code

[issue9732] Addition of getattr_static for inspect module

2010-09-01 Thread Michael Foord
Michael Foord added the comment: Tests require Python 3. Implementation works with Python 2 as well. -- Added file: http://bugs.python.org/file18700/test_static.py ___ Python tracker <http://bugs.python.org/issue9

[issue9732] Addition of getattr_static for inspect module

2010-09-01 Thread Michael Foord
Changes by Michael Foord : Removed file: http://bugs.python.org/file18700/test_static.py ___ Python tracker <http://bugs.python.org/issue9732> ___ ___ Python-bugs-list m

[issue9732] Addition of getattr_static for inspect module

2010-09-01 Thread Michael Foord
Changes by Michael Foord : -- Removed message: http://bugs.python.org/msg115297 ___ Python tracker <http://bugs.python.org/issue9732> ___ ___ Python-bugs-list m

[issue9732] Addition of getattr_static for inspect module

2010-09-01 Thread Michael Foord
Michael Foord added the comment: Tests require Python 3. Implementation works with Python 2 as well. -- Added file: http://bugs.python.org/file18701/test_static.py ___ Python tracker <http://bugs.python.org/issue9

[issue9732] Addition of getattr_static for inspect module

2010-09-01 Thread Michael Foord
Changes by Michael Foord : -- Removed message: http://bugs.python.org/msg115296 ___ Python tracker <http://bugs.python.org/issue9732> ___ ___ Python-bugs-list m

[issue9732] Addition of getattr_static for inspect module

2010-09-01 Thread Michael Foord
Michael Foord added the comment: (Reposted as text was entirely duplicated - oops.) As discussed on python-dev, a version of getattr that does static lookups - bypassing the descriptor protocol, __getattr__, and __getattribute__. Initial implementation by Nick Coghlan, amended and tests

[issue9732] Addition of getattr_static for inspect module

2010-09-01 Thread Michael Foord
Michael Foord added the comment: Since the addition of __dir__, dir(obj) can return arbitrary values. Typically (I guess) this will be used to add dynamically created attributes that this function will fail to find - so it is *more* likely that we will fail to find something in dir than the

[issue9732] Addition of getattr_static for inspect module

2010-09-01 Thread Michael Foord
Michael Foord added the comment: (Or vice versa - getattr_static may succeed in finding members - like descriptors that raise AttributeError when fetched - when getattr fails.) -- ___ Python tracker <http://bugs.python.org/issue9

[issue9754] assertWarns and assertWarnsRegexp

2010-09-03 Thread Michael Foord
Michael Foord added the comment: +1 -- ___ Python tracker <http://bugs.python.org/issue9754> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyth

[issue9754] assertWarns and assertWarnsRegexp

2010-09-03 Thread Michael Foord
Michael Foord added the comment: (Note that in general I am against extending the TestCase API with more asserts given how wide it is and how much it has expanded in recent versions. I've written warning checking code enough times for third party projects that I think this is worth it t

[issue9754] assertWarns and assertWarnsRegexp

2010-09-03 Thread Michael Foord
Michael Foord added the comment: Why not accepting a tuple of warnings? That doesn't make sense for assertWarnsRegexp of course. -- ___ Python tracker <http://bugs.python.org/i

[issue9796] Add summary tables for unittest API

2010-09-09 Thread Michael Foord
Michael Foord added the comment: This has been on my 'todo list' for a long time. Feel free to get to it before me. Please *don't* include the now deprecated assert* methods in the table. I'd like to move all the deprecated methods to a separate section of the documentati

[issue9831] test_distutils fails on MacOSX 10.6

2010-09-12 Thread Michael Foord
Changes by Michael Foord : -- nosy: -michael.foord ___ Python tracker <http://bugs.python.org/issue9831> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue9857] SkipTest in tearDown is reported an as an error

2010-09-15 Thread Michael Foord
Michael Foord added the comment: Interesting use case. If the test has not yet failed this is fine. The problem is that if an exception has *already* been raised then it will already have been added to the result - so by then skipping is meaningless (or contradictory - the test can fail

[issue1705520] pyunit should allow __unittest in locals to trim stackframes

2010-09-17 Thread Michael Foord
Michael Foord added the comment: It is relevant and would be *possible* to implement. I'm not 100% convinced it is a good *enough* idea to make it worth adding though. I'd like to leave the issue open for the moment in case other people want

[issue9868] test_locale leaves locale changed

2010-09-23 Thread Michael Foord
Michael Foord added the comment: unittest *can't* know which setUp methods have already been called if an error occurs in one of them (because they are called explicitly by the sub-classes and not by unittest itself). Given this, the specific fix suggested seems

[issue9868] test_locale leaves locale changed

2010-09-23 Thread Michael Foord
Michael Foord added the comment: Destructors are special cased in many languages and tearDown is not a destructor. More importantly though the change you suggest would be backwards incompatible. The 'correct' way to do this in new code is to use cleanUp functions which *are* call

[issue9926] Wrapped TestSuite subclass does not get __call__ executed

2010-09-23 Thread Michael Foord
Michael Foord added the comment: Right, _wrapped_run is private and not intended to be overridden. Perhaps slightly ironically (for this particular bug report) is that the change was introduced to support class and module level setUp and tearDown (similar to the use-case it now blocks

[issue9926] Wrapped TestSuite subclass does not get __call__ executed

2010-09-23 Thread Michael Foord
Michael Foord added the comment: Hmmm... 2.7 has already been released and has the same issue, so 'drastic' changes (like renaming BaseTestSuite back to TestSuite) are probably out. -- components: +Library (Lib) versions: +Python 2.7

[issue9926] Wrapped TestSuite subclass does not get __call__ executed

2010-09-24 Thread Michael Foord
Michael Foord added the comment: Ok, so here is an idea that could remove the need for TestSuite._wrapped_run. TestSuite.run could "tag" the result object (set an attribute). Nested TestSuites would see an already tagged suite and do nothing (beyond running tests of course). The

[issue9926] Wrapped TestSuite subclass does not get __call__ executed

2010-09-24 Thread Michael Foord
Michael Foord added the comment: On 24/09/2010 19:23, Martin v. Löwis wrote: > Martin v. Löwis added the comment: >> Perhaps slightly ironically (for this particular bug report) is that >> the change was introduced to support class and module level setUp and >> tearDow

[issue9926] Wrapped TestSuite subclass does not get __call__ executed

2010-09-25 Thread Michael Foord
Michael Foord added the comment: The attached patch fixes the issue (I think...) by tagging the result object. It removes the need for _wrapped_result altogether. The test fails without the change to TestSuite and passes with the change. This could be applied to 2.7-maint and py3k. Uhm

[issue9082] warnings.filterwarnings doesn't work with -O

2010-09-27 Thread Michael Foord
Michael Foord added the comment: When I run with -OO I get 42 test failures. Most of them look like they are due to missing docstrings but some are likely to be due to missing asserts. 42 tests failed: test_bisect test_cmd test_code test_collections test_compileall test_ctypes

[issue9082] warnings.filterwarnings doesn't work with -O

2010-09-27 Thread Michael Foord
Michael Foord added the comment: Most of those failures look like they have a similar cause (not all of them though) related to running doctests. When issue 6292 was closed all tests passed with -OO, so this is a regression. I'm raising a separate issue for that. Looking at the

[issue9964] Test failures with -OO

2010-09-27 Thread Michael Foord
New submission from Michael Foord : When I run the test suite (py3k branch) with -OO I get 42 failures. Most of these look like they are caused by the same (or a similar) problem (attempting to run doctests from now-non-existent docstrings). The tests that fail are: When I run with -OO I get

[issue9082] warnings.filterwarnings doesn't work with -O

2010-09-27 Thread Michael Foord
Michael Foord added the comment: Cool - although I *do* see failures under -O; test_import for example. That one is a __pycache__ test, so barry's fault I think. I'll detail the failures in issue 9964 as I think *most* of them are caused by a problem with pdb.py In fact, if you

[issue9082] warnings.filterwarnings doesn't work with -O

2010-09-27 Thread Michael Foord
Changes by Michael Foord : Removed file: http://bugs.python.org/file19035/pdb.diff ___ Python tracker <http://bugs.python.org/issue9082> ___ ___ Python-bugs-list mailin

[issue9082] warnings.filterwarnings doesn't work with -O

2010-09-27 Thread Michael Foord
Michael Foord added the comment: Oops. The patch should go to issue 9964. Sorry for all this noise. -- ___ Python tracker <http://bugs.python.org/issue9

[issue9964] Test failures with -OO

2010-09-27 Thread Michael Foord
Michael Foord added the comment: Most of the failures are caused by a problem in pdb. In fact, if you run Python with -OO you can't even *import* pdb. The attached patch fixes that problem (a hasty and untested patch though), and that reduces the number of failures to 5: 5 tests f

[issue9969] tokenize: add support for tokenizing 'str' objects

2010-09-28 Thread Michael Foord
Changes by Michael Foord : -- nosy: +michael.foord ___ Python tracker <http://bugs.python.org/issue9969> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue9969] tokenize: add support for tokenizing 'str' objects

2010-09-28 Thread Michael Foord
Michael Foord added the comment: Note from Nick Coghlan from the Python-dev discussion: A very quick scan of _tokenize suggests it is designed to support detect_encoding returning None to indicate the line iterator will return already decoded lines. This is confirmed by the fact the standard

[issue9977] TestCase.assertItemsEqual's description of differences

2010-09-28 Thread Michael Foord
Changes by Michael Foord : -- assignee: -> michael.foord components: +Library (Lib) versions: +Python 3.2 ___ Python tracker <http://bugs.python.org/iss

[issue9976] Make TestCase._formatMessage public

2010-09-28 Thread Michael Foord
Changes by Michael Foord : -- assignee: -> michael.foord components: +Library (Lib) versions: +Python 3.2 ___ Python tracker <http://bugs.python.org/iss

[issue10049] Add a "no-op" (null) context manager to contextlib

2010-10-08 Thread Michael Foord
Michael Foord added the comment: +1 Looks like a reasonable use case. -- nosy: +michael.foord, ncoghlan ___ Python tracker <http://bugs.python.org/issue10

  1   2   3   4   5   6   7   8   9   10   >