[issue17015] mock could be smarter and inspect the spec's signature

2013-01-30 Thread Michael Foord
Michael Foord added the comment: Ah, well if the bugfix exists everywhere that function signatures exist then it shouldn't be a problem. (I think there is already a backport of inspect.signature() by Nick Coghlan.) -- ___ Python tracker

[issue17041] Fix tests for build --without-doc-strings

2013-01-31 Thread Michael Foord
Changes by Michael Foord : -- nosy: -michael.foord ___ Python tracker <http://bugs.python.org/issue17041> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue2824] zipfile to handle duplicate files in archive

2013-01-31 Thread Michael Driscoll
Michael Driscoll added the comment: Whatever became of this? We just stumbled across this bug in our code at work where we accidentally put multiple files of the same name into the zip file and not only does it not overwrite the others, but when you go to access that file name, it grabs the

[issue17013] Allow waiting on a mock

2013-02-04 Thread Michael Foord
Michael Foord added the comment: There is a similar feature request on the mock issue tracker: http://code.google.com/p/mock/issues/detail?id=189 I prefer this proposal to the other one though. (Although technically allowing a wait for multiple calls is more flexible

[issue11448] docs for HTTPConnection.set_tunnel are ambiguous

2013-02-08 Thread Michael Stahn
Michael Stahn added the comment: I thought the same as Ryan when reading the API. The best way would have been to call "set_tunnel" -> "set_proxy" and to implement the behaviour you expect on this: setting a proxy. There are some more places at this code which are no

[issue16997] subtests

2013-02-10 Thread Michael Foord
Michael Foord added the comment: Please don't commit I think we still need a discussion as to whether subtests or paramaterized tests are a better approach. I certainly don't think we need both and there are a lot of people asking for parameterized tests. I also haven't had a

[issue16997] subtests

2013-02-10 Thread Michael Foord
Michael Foord added the comment: Subtests break the current unittest api of suite.countTests() and I fear they will also break tools that use the existing test result api to generate junit xml for continuous integration. I would like to add a "parameterized test" mechanism to unit

[issue16997] subtests

2013-02-10 Thread Michael Foord
Michael Foord added the comment: "However, I think you're making a mistaking by seeing them as *competing* APIs, rather than seeing subtests as a superior implementation strategy for the possible later introduction of a higher level parameterized tests API." Parameterized tests a

[issue16997] subtests

2013-02-10 Thread Michael Foord
Michael Foord added the comment: A comment from lifeless on IRC (Robert Collins): [12:15:46] please consider automated analysis. How can someone tell which test actually failed ? [12:15:55] How can they run just that test in future

[issue16997] subtests

2013-02-10 Thread Michael Foord
Michael Foord added the comment: My concern is that this re-uses the existing TestResult.add* methods in a different way (including calling addError multiple times). This can break existing tools. Fix suggested by lifeless on IRC. A sub test failure / success / exception calls the following

[issue16997] subtests

2013-02-10 Thread Michael Foord
Michael Foord added the comment: And on the "superior implementation strategy", both nose and py.test used to have runtime test generation and both have deprecated them and moved to collection time parameterization. (But I guess we know better.) You don't need PEP 422 for p

[issue9815] assertRaises as a context manager keeps tracebacks and frames alive

2013-02-10 Thread Michael Foord
Michael Foord added the comment: The patch py3k_fix__AssertRaisesContext.patch looks good. A test would be nice. The code already attempts to sanitize the traceback, so sanitizing __cause__ and __context__ seems reasonable. -- versions: +Python 3.3, Python 3.4

[issue1778410] removeTest() method patch for unittest.TestSuite

2013-02-10 Thread Michael Foord
Michael Foord added the comment: I'm pretty sure the proposed patch doesn't work - but there's no test for it so I can't be sure. I can't think of a better basic strategy, but the strategy here is horrible. This means I'm sympathetic to the desire for a r

[issue1778410] removeTest() method patch for unittest.TestSuite

2013-02-10 Thread Michael Foord
Michael Foord added the comment: I think better filtering at the collection phase - collecting tests by name or filtering out tests by name - could obviate the need for this. -- ___ Python tracker <http://bugs.python.org/issue1778

[issue7897] Support parametrized tests in unittest

2013-02-10 Thread Michael Foord
Michael Foord added the comment: Looks like we're going to get subtests ( issue #16997 ) instead of parameterized tests. -- ___ Python tracker <http://bugs.python.org/i

[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 <http://bugs.python.org/issue16

[issue17052] unittest discovery should use self.testLoader

2013-02-11 Thread Michael Foord
Michael Foord added the comment: I think you're right! Thanks. -- assignee: -> michael.foord resolution: fixed -> status: closed -> open ___ Python tracker <http://bugs.pyth

[issue17063] assert_called_with could be more powerful if it allowed placeholders

2013-02-11 Thread Michael Foord
Michael Foord added the comment: I still don't particularly like the idea of the assert_* methods returning something. If the call args tuples had args and kwargs attributes, for which there are outstanding feature requests, then you could simply do: my_mock(1, someobj(), bar=someoth

[issue15351] Add to unittest.TestCase support for using context managers

2013-02-11 Thread Michael Foord
Changes by Michael Foord : -- assignee: -> michael.foord ___ Python tracker <http://bugs.python.org/issue15351> ___ ___ Python-bugs-list mailing list Unsubscri

[issue17196] crash

2013-02-12 Thread Michael Foord
Changes by Michael Foord : -- resolution: -> works for me stage: -> committed/rejected status: open -> closed ___ Python tracker <http://bugs.python.or

[issue18993] There is an overshadowed and invalid test in testmock.py

2013-09-12 Thread Michael Foord
Michael Foord added the comment: Although I'm not certain the first test is "invalid". It's testing a different case than the second test. So if the first test passes it should be renamed rather than removed. If it *fails* then I'd like to look at the behaviour

[issue18993] There is an overshadowed and invalid test in testmock.py

2013-09-12 Thread Michael Foord
Michael Foord added the comment: Good catch - thanks! -- ___ Python tracker <http://bugs.python.org/issue18993> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue18993] There is an overshadowed and invalid test in testmock.py

2013-09-13 Thread Michael Foord
Michael Foord added the comment: Well, they actually test slightly different scenarios - they're *not* just duplicates of each other. -- ___ Python tracker <http://bugs.python.org/is

[issue18993] There is an overshadowed and invalid test in testmock.py

2013-09-14 Thread Michael Foord
Michael Foord added the comment: On balance I think that this test failing is *correct* (after deleting an attribute the old mock should *not* come back). I'd rather adjust the test to assert this than just remove it though. -- ___ Python tr

[issue11798] Test cases not garbage collected after run

2013-09-14 Thread Michael Foord
Michael Foord added the comment: Can that be fixed in tulip? -- ___ Python tracker <http://bugs.python.org/issue11798> ___ ___ Python-bugs-list mailing list Unsub

[issue11798] Test cases not garbage collected after run

2013-09-16 Thread Michael Foord
Michael Foord added the comment: If we're sure suite._cleanupis a *good* api for this then fine to expose it (and document) it as a public api. I'll take a look at it in a bit. Test suites will still have to do *some* monkeying around to set suite.cleanup (presumably in load_test

[issue19016] autospecced namedtuples should be truthy by default

2013-09-16 Thread Michael Foord
Michael Foord added the comment: The problem is that the change you're proposing is backwards incompatible. Code using MagicMock and objects with length will break. -- assignee: -> michael.foord versions: +Python 3.4 -Python 3.5 ___ Python

[issue18996] unittest: more helpful truncating long strings

2013-09-16 Thread Michael Foord
Michael Foord added the comment: Awesome, thanks for this work. The only thing I'd say is that if _common_shorten is always called with two args - and safe_repr is always called on them - then why not have it take two args and call safe_repr on

[issue19046] SystemError: ..\Objects\weakrefobject.c:903: bad argument to internal function

2013-09-19 Thread Michael Herrmann
New submission from Michael Herrmann: I'm on 32 bit Python 2.7.3 and 64 bit Windows 7. I am working on a complex, multithreaded application which uses COM to communicate with other processes. My application uses regular expressions in a few (but not very many) places. An example re

[issue11798] Test cases not garbage collected after run

2013-09-19 Thread Michael Foord
Michael Foord added the comment: That would only be a shallow copy, so I'm not sure it's worth the effort. The test has the opportunity in the setUp to ensure that initial state is correct - so I would leave that per test. Obviously sharing state between tests is prima facie ba

[issue11798] Test cases not garbage collected after run

2013-09-19 Thread Michael Foord
Michael Foord added the comment: On 19 Sep 2013, at 14:06, Antoine Pitrou wrote: > > Antoine Pitrou added the comment: > >> That would only be a shallow copy, so I'm not sure it's worth the >> effort. The test has the opportunity in the setUp to ensure that >

[issue11798] Test cases not garbage collected after run

2013-09-19 Thread Michael Foord
Michael Foord added the comment: Ah right, my mistake. Before setUp there shouldn't be test state. (Although tests are free to do whatever they want in __init__ too and I've seen plenty of TestCase subclasses using __init__ when they should be using setUp.) Essentially though _cl

[issue11798] Test cases not garbage collected after run

2013-09-19 Thread Michael Foord
Michael Foord added the comment: Having TestLoader.loadTestsFromTestCase() return a "lazy suite" that defers testcase instantiation until iteration is a nice idea. Unfortunately the TestSuite.addTests api iterates over a suite to add new tests. i.e. the code that builds a TestSuite

[issue19076] Pdb.do_break calls error with obsolete file kwarg

2013-09-22 Thread Michael Smith
New submission from Michael Smith: Pretty straightforward: File "/usr/local/Cellar/python3/3.3.2/Frameworks/Python.framework/Versions/3.3/lib/python3.3/pdb.py", line 675, in do_break self.error(err, file=self.stdout) TypeError: error() got an unexpected keyword argument &#

[issue19016] autospecced namedtuples should be truthy by default

2013-09-27 Thread Michael Foord
Michael Foord added the comment: I dislike adding namedtuple specific code to mock. How many different types should we special case here and in other places? -- ___ Python tracker <http://bugs.python.org/issue19

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

2013-10-11 Thread Michael Foord
Michael Foord added the comment: Ouch. Looking. -- ___ Python tracker <http://bugs.python.org/issue19217> ___ ___ Python-bugs-list mailing list Unsubscribe:

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

2013-10-18 Thread Michael Foord
Michael Foord added the comment: use_load_tests was deliberately undocumented. IIRC it only exists to allow us to load tests from a package module (__init__.py) without invoking load_tests - it maybe that it can just go away altogether now. I'll need to look at the code to co

[issue19323] typo in statistics documentation

2013-10-21 Thread Michael Merickel
New submission from Michael Merickel: http://docs.python.org/dev/library/statistics.html#mean describes the mean as "effected" by outliers, when it should say "affected". -- assignee: docs@python components: Documentation messages: 200704 nosy: docs@python, mmeric

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

2013-10-21 Thread Michael Foord
Michael Foord added the comment: pprint is also likely to have performance issues. I agree with Ezio that a diff consisting of more than 30(x2) lines is not likely to be directly useful anyway. A test for the changed behaviour would be nice

[issue19352] unittest loader barfs on symlinks

2013-10-22 Thread Michael Foord
Michael Foord added the comment: Good catch and fix Antoine. Thanks. -- ___ Python tracker <http://bugs.python.org/issue19352> ___ ___ Python-bugs-list mailin

[issue19516] segmentation fault using a dict as a key

2013-11-06 Thread Michael Merickel
New submission from Michael Merickel: I assume there is some incompatibility in the maverick's C runtime, but getting a segfault only on the python binaries from python.org. Version shipped by Apple OS X 10.9 Mavericks: ~❯ python2.7 Python 2.7.5 (default, Sep 12 2013, 21:33:34) [GCC

[issue19521] parallel build race condition on AIX since python-3.2

2013-11-07 Thread Michael Haubenwallner
New submission from Michael Haubenwallner: Since python-3.2, there is a race condition building in parallel on AIX: Consider these Makefile(.pre.in) rules: $(BUILDPYTHON): ... $(LINKCC) ... $(LINKFORSHARED) ... Modules/_testembed: ... $(LINKCC) ... $(LINKFORSHARED) ... Modules

[issue19521] parallel build race condition on AIX since python-3.2

2013-11-07 Thread Michael Haubenwallner
Michael Haubenwallner added the comment: I'm unsure about the real purpose of _testembed, but given the name it does make sense to me to export the same symbols as $(BUILDPYTHON), thus reusing python.exp. -- ___ Python tracker

[issue18235] _sysconfigdata.py wrong on AIX installations

2013-11-08 Thread Michael Haubenwallner
Michael Haubenwallner added the comment: Actually, ld_so_aix is autogenerated from ld_so_aix.in into builddir, while makexp_aix is not. Attached patch eventually might fix the test too? -- nosy: +haubi Added file: http://bugs.python.org/file32542/python-tip-aix-absbuilddir.patch

[issue19529] Fix unicode_aswidechar() with 4byte unicode and 2byte wchar_t, for AIX

2013-11-08 Thread Michael Haubenwallner
New submission from Michael Haubenwallner: The problem raises during build already when trying to run setup.py, where ./python is unavailable to locate the 'encodings' module and aborts. It turns out that (some of) the filenames searched for are broken due to wrong conversion fr

[issue19529] Fix unicode_aswidechar() with 4byte unicode and 2byte wchar_t, for AIX

2013-11-10 Thread Michael Haubenwallner
Michael Haubenwallner added the comment: It is the abort() libc function being called, causing a core file to be written. And I can see the backtrace from both the core file or when running in the debugger. Yes: I already have included this fix into my python-3.2.5 packaging. I'm basi

[issue17919] AIX POLLNVAL definition causes problems

2013-11-12 Thread Michael Haubenwallner
Michael Haubenwallner added the comment: This is a regression since 2.7.4 because of http://bugs.python.org/issue15989. As the 'events' and 'revents' members of 'struct pollfd' both are bitfields, the question actually is why they need to be signed at all. A

[issue17919] AIX POLLNVAL definition causes problems

2013-11-12 Thread Michael Haubenwallner
Changes by Michael Haubenwallner : -- versions: +Python 3.2, Python 3.3, Python 3.4, Python 3.5 ___ Python tracker <http://bugs.python.org/issue17919> ___ ___

[issue17457] Unittest discover fails with namespace packages and builtin modules

2013-11-17 Thread Michael Foord
Michael Foord added the comment: I do want to get this into 3.4. The logic is non-trivial though, so I need to understand it before I can add it to discovery. It certainly *looks* good. -- ___ Python tracker <http://bugs.python.org/issue17

[issue19647] unittest.TestSuite consumes tests

2013-11-19 Thread Michael Foord
Michael Foord added the comment: The new behaviour is intentional, glad you've managed to work around it. -- resolution: -> invalid stage: -> committed/rejected status: open -> closed ___ Python tracker <http://bugs.pyth

[issue17457] Unittest discover fails with namespace packages and builtin modules

2013-11-23 Thread Michael Foord
Michael Foord added the comment: I'm going to commit this so we get it in before the feature freeze. It sounds like the remaining issue is minor and we can resolve it in the betas. Note that if we attempt discovery from a namespace package and fail we should create a ModuleImportError

[issue17457] Unittest discover fails with namespace packages and builtin modules

2013-11-23 Thread Michael Foord
Michael Foord added the comment: Need doc updates -- ___ Python tracker <http://bugs.python.org/issue17457> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue19746] No introspective way to detect ModuleImportFailure

2013-11-24 Thread Michael Foord
Michael Foord added the comment: Seems like a perfectly reasonable request. I've no particular preference on an api for this though. -- ___ Python tracker <http://bugs.python.org/is

[issue19352] unittest loader barfs on symlinks

2013-11-29 Thread Michael Foord
Michael Foord added the comment: This can happen when the code used to compare the paths is different from the code used to generate the failure message. This of course masks the real problem. I can look at where that might be possible and then hopefully we can get a genuine error message

[issue19707] Check if unittest.mock needs updating for PEP 451

2013-12-01 Thread Michael Foord
New submission from Michael Foord: It shouldn't do, so long as __import__ supports PEP 451. unittest.mock.patch uses __import__ to find modules specified by name. -- ___ Python tracker <http://bugs.python.org/is

[issue18235] _sysconfigdata.py wrong on AIX installations

2013-12-05 Thread Michael Haubenwallner
Michael Haubenwallner added the comment: Kindly ping. Do you prefer another report for the aix-absbuilddir patch as this one is already closed? -- ___ Python tracker <http://bugs.python.org/issue18

[issue18235] _sysconfigdata.py wrong on AIX installations

2013-12-05 Thread Michael Haubenwallner
Michael Haubenwallner added the comment: Erm, question target was the python committers. And I'd create the new issue if they prefer. -- ___ Python tracker <http://bugs.python.org/is

[issue19907] gettext - Non ascii chars in header

2013-12-06 Thread Michael Müller
New submission from Michael Müller: When having non ascii chars in the header of an translation file (xxx.po) the following error will be raised: File "D:\Python33\lib\gettext.py", line 410, in translation t = _translations.setdefault(key, class_(fp)) File "D:\Python33

[issue19907] gettext - Non ascii chars in header

2013-12-06 Thread Michael Müller
Michael Müller added the comment: Used encoding is utf-8. Testfile I used added to this comment. Second about the PO-Revision-Date: It should be human readable. It's unimportant for the program itself - it's used for the translator of the xxx.po file. Normally the whole header could

[issue3423] DeprecationWarning message applies to wrong context with exec()

2014-06-22 Thread Michael Wu
Changes by Michael Wu : Removed file: http://bugs.python.org/file35732/testfile.py ___ Python tracker <http://bugs.python.org/issue3423> ___ ___ Python-bugs-list mailin

[issue3423] DeprecationWarning message applies to wrong context with exec()

2014-06-22 Thread Michael Wu
Michael Wu added the comment: I ran the examples in this thread with Python 3.5, and it appears to print out the correct line that exec() occurs on (http://codepad.org/M5CevRwT). It might be time to close this issue. -- nosy: +Michael.Wu Added file: http://bugs.python.org/file35732

[issue21820] unittest: unhelpful truncating of long strings.

2014-06-23 Thread Michael Foord
Michael Foord added the comment: I agree that it looks like a bug that this behaviour is triggering for non-strings. There is separate code (which uses maxDiff) for comparing collections. Switching off the behaviour for 3.4 / 2.7 and a new class attribute for 3.5 is a good approach

[issue10417] unittest triggers UnicodeEncodeError with non-ASCII character in the docstring of the test function

2014-07-03 Thread Michael Foord
Michael Foord added the comment: So the proposed fix does the backslashreplace for errors and then re-decodes, allowing the encode in the stream to work. That seems like a good fix. -- ___ Python tracker <http://bugs.python.org/issue10

[issue21270] unittest.mock.call object has inherited count method

2014-07-08 Thread Michael Foord
Michael Foord added the comment: Those are the only ones I think. Thanks. -- ___ Python tracker <http://bugs.python.org/issue21270> ___ ___ Python-bugs-list mailin

[issue17185] unittest mock create_autospec doesn't correctly replace mocksignature

2014-07-18 Thread Michael Foord
Michael Foord added the comment: It was a functionality change, not just a name change. -- ___ Python tracker <http://bugs.python.org/issue17185> ___ ___ Pytho

[issue16778] Logger.findCaller needs to be smarter

2014-07-20 Thread Michael Rohan
Michael Rohan added the comment: I recently implemented a custom logger derived from Logger and to get the reporting of modules, etc, correct, I implemented the findCaller using the same code as library code with the minor change of if filename == _srcfile: to if filename in [logging._srcfile

[issue22103] bdist_wininst does not run install script

2014-07-29 Thread Michael Büsch
New submission from Michael Büsch: The bdist_wininst installer does not run the specified --install-script. Attached is an example project foo.zip. setup.py is invoked as follows: py setup.py bdist_wininst --install-script foo_postinstall.py The installer shows that it successfully ran the

[issue10572] Move test sub-packages to Lib/test

2014-07-30 Thread Michael Foord
Michael Foord added the comment: I still dislike moving tests around. -- ___ Python tracker <http://bugs.python.org/issue10572> ___ ___ Python-bugs-list mailin

[issue7897] Support parametrized tests in unittest

2014-08-01 Thread Michael Foord
Michael Foord added the comment: I agree with Nick. There is a potential use case for parameterized tests as well as sub tests, but it's not something we're going to rush into. -- ___ Python tracker <http://bugs.python.

[issue22092] Executing some tests inside Lib/unittest/test individually throws Error

2014-08-03 Thread Michael Foord
Michael Foord added the comment: Patch looks fine, easy enough to change for unittest2 (if I ever have the time for a new release!) -- ___ Python tracker <http://bugs.python.org/issue22

[issue22140] "python-config --includes" returns a wrong path (double prefix)

2014-08-05 Thread Michael Dussere
New submission from Michael Dussere: Our python is installed on a shared directory that is accessed through a symbolic link. $ which python3.4-config /Produits/publics/x86_64.Linux.RH6/python/3.4.1/bin/python3.4-config $ ls -al /Produits lrwxrwxrwx 1 root root 13 Oct 31 2013 /Produits

[issue22138] patch.object doesn't restore function defaults

2014-08-06 Thread Michael Foord
Michael Foord added the comment: It might have to be. There's no general purpose solution that will fit every possible behaviour for a Python descriptor I'm afraid. -- ___ Python tracker <http://bugs.python.o

[issue22138] patch.object doesn't restore function defaults

2014-08-06 Thread Michael Foord
Michael Foord added the comment: And yes, there's deliberate proxy object support in mock.patch (django settings being one specific use-case). -- ___ Python tracker <http://bugs.python.org/is

[issue14534] Add method to mark unittest.TestCases as "do not run".

2014-08-07 Thread Michael Foord
Michael Foord added the comment: testBaseClass, abstractTestClass and abstractBaseClass are all fine with me. I wouldn't waste too much time bike-shedding it. If we need a decision let's go with abstractTestClass. -- ___ Python trac

[issue22180] operator.setitem example no longer works in Python 3 due to lazy map

2014-08-10 Thread Michael Williamson
New submission from Michael Williamson: The Python docs for the operator module include an example using map and setitem to "Build a dictionary that maps the ordinals from 0 to 255 to their character equivalents.": d = {} keys = range(256) vals = map(chr, key

[issue22243] Documentation on try statement incorrectly implies target of except clause can be any assignable expression

2014-08-21 Thread Michael Williamson
New submission from Michael Williamson: In the docs for the try statement [1], part of the grammar is: try1_stmt ::= "try" ":" suite ("except" [expression ["as" target]] ":" suite)+ ["else" ":"

[issue22197] Allow better verbosity / output control in test cases

2014-08-22 Thread Michael Foord
Michael Foord added the comment: This seems like a reasonable improvement, I'd be in favour. I'd be *slightly* concerned that a test can override an explicit verbosity setting of the user, but I guess that annoyance is up to the test writer (they should check for an explicit set

[issue22197] Allow better verbosity / output control in test cases

2014-08-22 Thread Michael Foord
Michael Foord added the comment: Yep. I have no qualms about allowing test cases to switch on buffering. -- ___ Python tracker <http://bugs.python.org/issue22

[issue22243] Documentation on try statement incorrectly implies target of except clause can be any assignable expression

2014-08-22 Thread Michael Williamson
Michael Williamson added the comment: > Using 'expression' (or 'expr' in the ast doc) for what should be 'exceptions: > identifier' or paranthesized tuple of identifiers;, is also too broad. > However, that must be enforced in the compiler rather than t

[issue22255] Multiprocessing freeze_support raises RuntimeError

2014-08-22 Thread Michael McAuliffe
New submission from Michael McAuliffe: On Windows, I froze a script that uses multiprocessing with cx-freeze and Python 3.4.1 that had freeze_support() in the "if __name__ == '__main__'" section of the main module, and the resulting executable crashes with a RuntimeError

[issue22293] unittest.mock: use slots in MagicMock to reduce memory footprint

2014-08-29 Thread Michael Foord
Michael Foord added the comment: Switching to Mock instead of MagicMock may help, as that doesn't have the magic proxies at all. (patch has an argument to specify which class of Mock should be used to create the mock object, MagicMock is just the default.) Other wise using __slots__ wou

[issue21112] 3.4 regression: unittest.expectedFailure no longer works on TestCase subclasses

2014-09-08 Thread Michael Foord
Michael Foord added the comment: The patch looks good to me. -- ___ Python tracker <http://bugs.python.org/issue21112> ___ ___ Python-bugs-list mailing list Unsub

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

2014-09-08 Thread Michael Foord
Michael Foord added the comment: I agree, load_tests should be honoured even when not invoked through discovery. If that wasn't the case it was an unfortunate oversight on my part! -- ___ Python tracker <http://bugs.python.org/is

[issue18232] running a suite with no tests is not an error

2014-09-09 Thread Michael Foord
Michael Foord added the comment: I'd agree that a test run that actually runs zero tests almost always indicates an error, and it would be better if this was made clear. I have this problem a great deal with Go, where the test tools are awful, and it's very easy to think

[issue21270] unittest.mock.call object has inherited count method

2014-09-11 Thread Michael Foord
Michael Foord added the comment: Thanks for this Kushal. It's not quite right though, count and index need to do the same as other attributes looked up with __getattr__. In fact delegating to __getattr__ is probably the easiest way of achieving that. (With the current patch the calls wi

[issue22541] Support both side_effect and return_value in a more human way

2014-10-02 Thread Michael Foord
Michael Foord added the comment: One of the use cases for side_effect is for dynamically changing the returned value based on input - so your option 1 just doesn't work. Using two line functions would make your code easier to read, and then your "workarounds" would look nat

[issue19950] Document that unittest.TestCase.__init__ is called once per test

2013-12-10 Thread Michael Foord
Michael Foord added the comment: I'd be happy with a doc change from "fixture" to instance (or maybe add instance in parentheses). I'd rather a simple change than making the documentation much longer. The reason for a separate instance per test is for test isolation. Each

[issue11798] Test cases not garbage collected after run

2013-12-28 Thread Michael Foord
Michael Foord added the comment: What's the purpose of _removed_tests in your fix, it doesn't appear to be used? -- ___ Python tracker <http://bugs.python.o

[issue11798] Test cases not garbage collected after run

2013-12-29 Thread Michael Foord
Michael Foord added the comment: Ah yes, I see - sorry. -- ___ Python tracker <http://bugs.python.org/issue11798> ___ ___ Python-bugs-list mailing list Unsub

[issue18566] In unittest.TestCase docs for setUp() and tearDown() don't mention AssertionError

2013-12-29 Thread Michael Foord
Michael Foord added the comment: Yep, those docs are just wrong. I'm trying to think of a concise rewording. -- ___ Python tracker <http://bugs.python.org/is

[issue20165] unittest TestResult wasSuccessful returns True when there are unexpected successes

2014-01-07 Thread Michael Foord
Michael Foord added the comment: I'm pretty sure this has been debated before (and the status quo is the result). Trying to find the issue. -- ___ Python tracker <http://bugs.python.org/is

[issue20165] unittest TestResult wasSuccessful returns True when there are unexpected successes

2014-01-07 Thread Michael Foord
Michael Foord added the comment: Hmmm... TestTools has wasSuccessful return False on an unexpected success [1] and I can't find an issue for any previous discussion. I don't use unexpected success, so I have no particular horse in this race but it seems more logical that wasSuccess

[issue20239] Allow repeated deletion of unittest.mock.Mock attributes

2014-01-13 Thread Michael Foord
New submission from Michael Foord: Reported as mock issue 221: http://code.google.com/p/mock/issues/detail?id=221 >>> from unittest.mock import Mock >>> m = Mock() >>> m.foo = 3 >>> del m.foo >>> m.foo = 4 >>> del m.foo Traceback (most rece

[issue20277] default __debug__ value and asserts

2014-01-16 Thread Michael Foord
Michael Foord added the comment: Having __debug__ True by default is unintuitive and not particularly useful. However it is relatively well known, so although it is "rarely" used that probably only means hundreds of thousands of piece of code. So it isn't going to ch

[issue20222] unittest.mock-examples doc uses builtin file which is removed in Python 3

2014-01-20 Thread Michael Foord
Michael Foord added the comment: Thanks for picking this up. /file/open/ should be fine. -- ___ Python tracker <http://bugs.python.org/issue20222> ___ ___ Pytho

[issue20419] it's not possible to set ECDH curve name via ssl.wrap_socket

2014-01-28 Thread Michael Gubser
New submission from Michael Gubser: One can only set the ECDH curve name via SSLContext.set_ecdh_curve(). ssl.wrap_socket() doesn't have a parameter to use it for the wrapping of the basic socket. Therefore one always has to do the detour over SSLContext. -- components: Library

[issue20487] Odd words in unittest.mock document.

2014-02-02 Thread Michael Foord
Michael Foord added the comment: A "side effect" is a mechanism Mock provides for mocks to have special behaviour when called. http://docs.python.org/3.3/library/unittest.mock.html#unittest.mock.Mock.side_effect The term is used very widely throughout the mock documentation,

[issue20145] unittest.assert*Regex functions should verify that expected_regex has a valid type

2014-02-10 Thread Michael Foord
Michael Foord added the comment: Agreed. -- ___ Python tracker <http://bugs.python.org/issue20145> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue1222585] C++ compilation support for distutils

2014-02-26 Thread Michael Crusoe
Changes by Michael Crusoe : -- nosy: +Michael.Crusoe ___ Python tracker <http://bugs.python.org/issue1222585> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue20804] Sentinels identity lost when pickled (unittest.mock)

2014-02-28 Thread Michael Foord
Michael Foord added the comment: Maybe making sentinels unpickleable would be a better solution. On the other hand I'd love to be able to [properly] customise object creation when unpickling. It would solve various other problems I've had from time to time. But that's well ou

<    17   18   19   20   21   22   23   24   25   26   >