[issue17826] Setting a side_effect on mock from create_autospec doesn't work

2014-04-14 Thread Michael Foord
Changes by Michael Foord : -- resolution: -> fixed stage: commit review -> committed/rejected status: open -> closed ___ Python tracker <http://bugs.python.or

[issue837046] pyport.h redeclares gethostname() if SOLARIS is defined

2014-04-15 Thread Michael Stahl
Michael Stahl added the comment: we carry a patch in LibreOffice for exactly this problem: http://cgit.freedesktop.org/libreoffice/core/tree/external/python3/python-3.3.0-i42553.patch.2 this was found many years ago in OOo: https://issues.apache.org/ooo/show_bug.cgi?id=42553 there is at least

[issue21236] patch to use cabinet.lib instead of fci.lib (fixes build with Windows SDK 8.0)

2014-04-15 Thread Michael Stahl
New submission from Michael Stahl: building with MSVC2012 and the Windows SDK 8.0 fails according to this page, the fci.lib is no longer available and cabinet.lib should be used instead: http://social.msdn.microsoft.com/Forums/en-US/vcgeneral/thread/3b85f36e-dffe-4589-adc3-13673b349812/ &quo

[issue21222] Mock create_autospec with name argument fails

2014-04-15 Thread Michael Foord
Michael Foord added the comment: You can use kwargs.pop instead of the two step fetch and delete. For the test, could you add an assert that the name is used. Can you add an extra underscore to the method name, to make it: test_create_autospec_with_name -- nosy: +michael.foord

[issue21238] unittest.mock.Mock should not allow you to use non-existent assert methods

2014-04-15 Thread Michael Foord
New submission from Michael Foord: A common problem with unittest.mock.Mock is to mistype an assert method. Because mocks create attributes on demand your test will pass without error. We should raise an AttributeError if you access any attribute name (that doesn't exist) starting with a

[issue21239] unittest.mock.patch.stopall intermittently doesn't work when the same thing is patched multiple times

2014-04-15 Thread Michael Foord
New submission from Michael Foord: stopall does not always stop all patches to single target http://code.google.com/p/mock/issues/detail?id=226 What steps will reproduce the problem? python code to reproduce error import mock def myfunc(): return 'hello' m = mock.patch('

[issue17660] mock.patch could whitelist builtins to not need create=True

2014-04-15 Thread Michael Foord
Michael Foord added the comment: Personally I don't think it looks ugly and that it is a point worth calling out. Other opinions welcomed. -- ___ Python tracker <http://bugs.python.org/is

[issue21222] Mock create_autospec with name argument fails

2014-04-15 Thread Michael Foord
Michael Foord added the comment: Looks good to me, but please change qobj and add a NEWS entry. -- ___ Python tracker <http://bugs.python.org/issue21222> ___ ___

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

2014-04-15 Thread Michael Foord
Michael Foord added the comment: Patch looks good to me. -- ___ Python tracker <http://bugs.python.org/issue18566> ___ ___ Python-bugs-list mailing list Unsub

[issue21254] PropertyMock refuses to raise AttributeErrror as a side effect

2014-04-16 Thread Michael Foord
New submission from Michael Foord: What steps will reproduce the problem? >>> import mock >>> a_mock = mock.MagicMock() >>> no_attribute = mock.PropertyMock(side_effect=AttributeError) >>> type(a_mock).property = no_attribute What is the expected outpu

[issue21255] Attaching a PropertyMock records calls

2014-04-16 Thread Michael Foord
New submission from Michael Foord: What steps will reproduce the problem? >>> foo = Mock(name='foo') >>> prop = PropertyMock(name='prop') >>> type(foo).prop = prop >>> foo.attach_mock(prop, 'prop') >&

[issue21256] Sort keyword arguments in mock _format_call_signature

2014-04-16 Thread Michael Foord
New submission from Michael Foord: Printing call args produces non-deterministic results, making them more or less useless in doctests. kwargs_string = ', '.join([ '%s=%r' % (key, value) for key, value in kwargs.items() ]) should be: kwargs_string = '

[issue21256] Sort keyword arguments in mock _format_call_signature

2014-04-16 Thread Michael Foord
Michael Foord added the comment: Yes to ordered kwargs! I would very much like to be able to order the keyword args in the order they were passed in, information which is currently lost. -- ___ Python tracker <http://bugs.python.org/issue21

[issue21238] unittest.mock.Mock should not allow you to use non-existent assert methods

2014-04-16 Thread Michael Foord
Michael Foord added the comment: It needs a NEWS entry, but looks good to me. -- ___ Python tracker <http://bugs.python.org/issue21238> ___ ___ Python-bugs-list m

[issue21258] Add __iter__ support for mock_open

2014-04-16 Thread Michael Foord
New submission from Michael Foord: mock_open returns a mock object suitable for using as a mock file handle. File handles support iteration, so mock_open should support that. If possible it should be integrated with the current read/readlines support (only if possible), so the suggested patch

[issue21256] Sort keyword arguments in mock _format_call_signature

2014-04-16 Thread Michael Foord
Michael Foord added the comment: Needs a test. -- ___ Python tracker <http://bugs.python.org/issue21256> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue21262] assert_not_called method for mocks

2014-04-16 Thread Michael Foord
Changes by Michael Foord : -- components: +Library (Lib) versions: +Python 3.5 ___ Python tracker <http://bugs.python.org/issue21262> ___ ___ Python-bugs-list m

[issue21262] assert_not_called method for mocks

2014-04-16 Thread Michael Foord
New submission from Michael Foord: A shortcut for asserting that the call_count of a mock is 0. -- assignee: kushal.das messages: 216546 nosy: kushal.das, michael.foord priority: normal severity: normal stage: needs patch status: open title: assert_not_called method for mocks type

[issue21269] Provide args and kwargs attributes on mock call objects

2014-04-16 Thread Michael Foord
New submission from Michael Foord: The unittest.mock.call object could have args/kwargs attributes to easily access the arguments it was called with. -- messages: 216585 nosy: michael.foord priority: normal severity: normal status: open title: Provide args and kwargs attributes on mock

[issue21269] Provide args and kwargs attributes on mock call objects

2014-04-16 Thread Michael Foord
Changes by Michael Foord : -- assignee: -> michael.foord components: +Library (Lib) nosy: +kushal.das stage: -> needs patch type: -> behavior versions: +Python 3.5 ___ Python tracker <http://bugs.python.or

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

2014-04-16 Thread Michael Foord
New submission from Michael Foord: The unittest.mock.call object inherits methods from tuple that prevent you using them as normal call attributes. They should be overridden. -- assignee: michael.foord messages: 216587 nosy: kushal.das, michael.foord priority: normal severity: normal

[issue18622] reset_mock on mock created by mock_open causes infinite recursion

2014-04-16 Thread Michael Foord
Changes by Michael Foord : -- nosy: +kushal.das versions: +Python 3.5 -Python 3.3 ___ Python tracker <http://bugs.python.org/issue18622> ___ ___ Python-bugs-list m

[issue21271] reset_mock needs parameters to also reset return_value and side_effect

2014-04-16 Thread Michael Foord
New submission from Michael Foord: unittest.mock.Mock.reset_mock deliberately doesn't reset the return_value and side_effect. It would be nice if it gained parameters so that it *could*. -- assignee: michael.foord components: Library (Lib) messages: 216588 nosy: kusha

[issue21303] Python 2.7 Spinbox Format Behaves Differently On Windows Versus Linux

2014-04-18 Thread Michael Boldischar
New submission from Michael Boldischar: Here is my code: self._image_set_number = Spinbox(self._ramp_group, from_=0, to=999, command=self.reset_rep, format="%03.0f") self._repetition_change = Spinbox(self._ramp_group, from_=00, to=99, format="%02.0f") On Linux, th

[issue21303] Python 2.7 Spinbox Format Behaves Differently On Windows Versus Linux

2014-04-18 Thread Michael Boldischar
Changes by Michael Boldischar : -- components: +Tkinter versions: +Python 2.7 ___ Python tracker <http://bugs.python.org/issue21303> ___ ___ Python-bugs-list m

[issue21303] Python 2.7 Spinbox Format Behaves Differently On Windows Versus Linux

2014-04-18 Thread Michael Boldischar
Changes by Michael Boldischar : -- type: -> behavior ___ Python tracker <http://bugs.python.org/issue21303> ___ ___ Python-bugs-list mailing list Unsubscrib

[issue21303] Python 2.7 Spinbox Format Behaves Differently On Windows Versus Linux

2014-04-21 Thread Michael Boldischar
Michael Boldischar added the comment: Windows 7 64-bit: python --version Python 2.7.6 Debian 7 Linux 64-bit: $ python --version Python 2.7.3 -- ___ Python tracker <http://bugs.python.org/issue21

[issue21303] Python 2.7 Spinbox Format Behaves Differently On Windows Versus Linux

2014-04-21 Thread Michael Boldischar
Michael Boldischar added the comment: Windows 7 64-bit: >>> root.tk.eval('info patchlevel') '8.5.2' Debian 7 Linux 64-bit: root.tk.eval('info patchlevel') '8.5.11' -- ___ P

[issue837046] pyport.h redeclares gethostname() if SOLARIS is defined

2014-04-21 Thread Michael Stahl
Michael Stahl added the comment: (note that i haven't used any Solaris myself since 2011) * the #ifdef SOLARIS block still exists in current hg checkout * according to comment http://bugs.python.org/msg18910 the SOLARIS macro can not be defined during a build of python itself, so:

[issue21256] Sort keyword arguments in mock _format_call_signature

2014-04-22 Thread Michael Foord
Michael Foord added the comment: I agree with Antoine's review comments. With those changes in place, ok to commit. -- ___ Python tracker <http://bugs.python.org/is

[issue21255] Attaching a PropertyMock records calls

2014-04-22 Thread Michael Foord
Michael Foord added the comment: Not sure, but I guess it would be easy to find out. It will need some digging into to find out where the actual bug is. It shouldn't be hard to find though. -- ___ Python tracker <http://bugs.python.org/is

[issue17756] test_syntax_error fails when run in the installed location

2014-05-12 Thread Michael Foord
Michael Foord added the comment: It looks like the simplest fix would be to change "NameError:" to "NameError", as the problem is that they're (sometimes!?) on separate lines. This still tests what we want to test. --

[issue21478] mock calls don't propagate to parent (autospec)

2014-05-12 Thread Michael Foord
Michael Foord added the comment: Mock objects detect when another mock is added as a "child", but they don't currently detect that a function created by autospec has been added. It should be a fairly easy fix. -- assignee: -

[issue21478] mock calls don't propagate to parent (autospec)

2014-05-12 Thread Michael Foord
Changes by Michael Foord : -- nosy: +kushal.das stage: -> needs patch versions: +Python 3.5 ___ Python tracker <http://bugs.python.org/issue21478> ___ ___ Py

[issue21633] Argparse does not propagate HelpFormatter class to subparsers

2014-06-01 Thread Michael Cohen
New submission from Michael Cohen: Argparse has an option to set the custom help formatter class as a kwarg. For example one can define: class MyHelpFormatter(argparse.RawDescriptionHelpFormatter): def add_argument(self, action): if action.dest != "SUPPRESS":

[issue10656] "Out of tree" build fails on AIX 5.3

2014-06-02 Thread Michael Haubenwallner
Changes by Michael Haubenwallner : -- nosy: +haubi ___ Python tracker <http://bugs.python.org/issue10656> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue16189] ld_so_aix not found

2014-06-02 Thread Michael Haubenwallner
Changes by Michael Haubenwallner : -- nosy: +haubi ___ Python tracker <http://bugs.python.org/issue16189> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue13493] Import error with embedded python on AIX 6.1

2014-06-02 Thread Michael Haubenwallner
Changes by Michael Haubenwallner : -- nosy: +haubi ___ Python tracker <http://bugs.python.org/issue13493> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue14150] AIX, crash loading shared module into another process than python like operator.so results in 0509-130

2014-06-02 Thread Michael Haubenwallner
Michael Haubenwallner added the comment: Doing it this way strictly requires runtime-linking to be enabled, to have "the main executable" and the module use the same runtime instance of the libpython${VERSION}.so symbols. Instead, "the main executable" better should

[issue15590] --libs is inconsistent for python-config --libs and pkgconfig python --libs

2014-06-02 Thread Michael Haubenwallner
Michael Haubenwallner added the comment: Well, they should not be identical, as they are for different use cases. "pkg-config python" is to build an application containing a python interpreter (like python$EXE): + Link against libpython.so. Additionally, + re-export symbols from li

[issue21272] use _sysconfigdata to itinialize distutils.sysconfig

2014-06-03 Thread Michael Haubenwallner
Changes by Michael Haubenwallner : -- nosy: +haubi ___ Python tracker <http://bugs.python.org/issue21272> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue17454] ld_so_aix not used when linking c++ (scipy)

2014-06-03 Thread Michael Haubenwallner
Changes by Michael Haubenwallner : -- nosy: +haubi ___ Python tracker <http://bugs.python.org/issue17454> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue18235] _sysconfigdata.py wrong on AIX installations

2014-06-03 Thread Michael Haubenwallner
Changes by Michael Haubenwallner : Removed file: http://bugs.python.org/file32542/python-tip-aix-absbuilddir.patch ___ Python tracker <http://bugs.python.org/issue18

[issue18235] _sysconfigdata.py wrong on AIX installations

2014-06-03 Thread Michael Haubenwallner
Michael Haubenwallner added the comment: issue#10656 is the out-of-source part already. -- ___ Python tracker <http://bugs.python.org/issue18235> ___ ___ Pytho

[issue10656] "Out of tree" build fails on AIX 5.3

2014-06-03 Thread Michael Haubenwallner
Changes by Michael Haubenwallner : -- hgrepos: +246 ___ Python tracker <http://bugs.python.org/issue10656> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue16189] ld_so_aix not found

2014-06-03 Thread Michael Haubenwallner
Changes by Michael Haubenwallner : -- hgrepos: +247 ___ Python tracker <http://bugs.python.org/issue16189> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue21600] mock.patch.stopall doesn't work with patch.dict to sys.modules

2014-06-03 Thread Michael Foord
Michael Foord added the comment: Yep, patch.dict wasn't designed with stopall in mind so it needs adding. Thanks for pointing this out and your fix. Your patch isn't quite right, those operations shouldn't be inside the try excepts. (And there are no tests.)

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

2014-06-03 Thread Michael Haubenwallner
Changes by Michael Haubenwallner : -- hgrepos: +248 ___ Python tracker <http://bugs.python.org/issue19521> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue10656] "Out of tree" build fails on AIX

2014-06-03 Thread Michael Haubenwallner
Changes by Michael Haubenwallner : -- title: "Out of tree" build fails on AIX 5.3 -> "Out of tree" build fails on AIX versions: +Python 3.4, Python 3.5 ___ Python tracker <http://

[issue10656] "Out of tree" build fails on AIX 5.3

2014-06-03 Thread Michael Haubenwallner
Changes by Michael Haubenwallner : -- hgrepos: -246 ___ Python tracker <http://bugs.python.org/issue10656> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue10656] "Out of tree" build fails on AIX

2014-06-03 Thread Michael Haubenwallner
Michael Haubenwallner added the comment: Basically the same as Tristan's patch, with a little improvement to not rely on PATH to find makexp_aix within ld_so_aix. Thanks! -- Added file: http://bugs.python.org/file35476/issue10656-out-of-source-build-on-aix.

[issue16189] ld_so_aix not found

2014-06-03 Thread Michael Haubenwallner
Changes by Michael Haubenwallner : -- hgrepos: -247 ___ Python tracker <http://bugs.python.org/issue16189> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue16189] ld_so_aix not found

2014-06-03 Thread Michael Haubenwallner
Michael Haubenwallner added the comment: Problem here is that LDSHARED points to $(BINLIBDEST)/config/ld_so_aix, but it should be $(LIBPL)/ld_so_aix. Although an independent problem, this diff shares context with file#35476, so this patch depends on issue #10656. -- keywords: +patch

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

2014-06-03 Thread Michael Haubenwallner
Changes by Michael Haubenwallner : -- hgrepos: -248 ___ Python tracker <http://bugs.python.org/issue19521> ___ ___ Python-bugs-list mailing list Unsubscribe:

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

2014-06-03 Thread Michael Haubenwallner
Michael Haubenwallner added the comment: Patch including configure update now. -- Added file: http://bugs.python.org/file35479/issue19521-parallel-build-race-on-aix.patch ___ Python tracker <http://bugs.python.org/issue19

[issue21660] Substitute @TOKENS@ from sysconfig variables, for python-config and python.pc

2014-06-04 Thread Michael Haubenwallner
New submission from Michael Haubenwallner: On the way to fix issue#15590 especially for AIX, I've discovered that the values provided by config.status used to substitute @TOKEN@ in python-config, python.pc as well as python-config.py may contain references to Makefile variables not

[issue21660] Substitute @TOKENS@ from sysconfig variables, for python-config and python.pc

2014-06-04 Thread Michael Haubenwallner
Changes by Michael Haubenwallner : -- hgrepos: +249 ___ Python tracker <http://bugs.python.org/issue21660> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue21660] Substitute @TOKENS@ from sysconfig variables, for python-config and python.pc

2014-06-04 Thread Michael Haubenwallner
Changes by Michael Haubenwallner : -- keywords: +patch Added file: http://bugs.python.org/file35481/6510f2df0d81.diff ___ Python tracker <http://bugs.python.org/issue21

[issue15590] --libs is inconsistent for python-config --libs and pkgconfig python --libs

2014-06-04 Thread Michael Haubenwallner
Michael Haubenwallner added the comment: So this diff - depending on issue#21660 - now drops showing any $LIBS from python-config, as python-modules usually do not link against any python-known libraries. Instead, now there is a new configure variable LINKFORMODULE, which is shown by python

[issue15590] --libs is inconsistent for python-config --libs and pkgconfig python --libs

2014-06-04 Thread Michael Haubenwallner
Changes by Michael Haubenwallner : -- keywords: +patch Added file: http://bugs.python.org/file35485/32143cda4d80.diff ___ Python tracker <http://bugs.python.org/issue15

[issue15590] --libs is inconsistent for python-config --libs and pkgconfig python --libs

2014-06-05 Thread Michael Haubenwallner
Michael Haubenwallner added the comment: For AIX, with both these configure variants: $ configure --prefix=/prefix --enable-shared CC=gcc CXX=g++ OPT= $ configure --prefix=/prefix --enable-shared --without-computed-gotos CC=xlc_r CXX=xlC_r OPT= the output changes like this

[issue15590] --libs is inconsistent for python-config --libs and pkgconfig python --libs

2014-06-05 Thread Michael Haubenwallner
Michael Haubenwallner added the comment: Now for --disable-shared: For AIX, with both these configure variants: $ configure --prefix=/prefix --disable-shared CC=gcc CXX=g++ OPT= $ configure --prefix=/prefix --disable-shared --without-computed-gotos CC=xlc_r CXX=xlC_r OPT= the output

[issue15590] --libs is inconsistent for python-config --libs and pkgconfig python --libs

2014-06-05 Thread Michael Haubenwallner
Michael Haubenwallner added the comment: Erm, the latter should read: For Linux, with this configure variant: $ configure --prefix=/prefix --disable-shared CC=gcc CXX=g++ Now reading GNU ld manpage for Linux: > $ PKG_CONFIG_PATH=/prefix/lib/pkgconfig pkg-config --libs python-3.4 &g

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

2014-06-06 Thread Michael Haubenwallner
Changes by Michael Haubenwallner : -- hgrepos: +251 ___ Python tracker <http://bugs.python.org/issue19521> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue10656] "Out of tree" build fails on AIX

2014-06-06 Thread Michael Haubenwallner
Changes by Michael Haubenwallner : -- hgrepos: +252 ___ Python tracker <http://bugs.python.org/issue10656> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue16189] ld_so_aix not found

2014-06-06 Thread Michael Haubenwallner
Changes by Michael Haubenwallner : -- hgrepos: +253 ___ Python tracker <http://bugs.python.org/issue16189> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue21600] mock.patch.stopall doesn't work with patch.dict to sys.modules

2014-06-06 Thread Michael Foord
Michael Foord added the comment: That's better - thanks. Another minor tweak needed though. stopall should only stop patches that were started with "start", not those used as context managers or decorators (or they will be stopped twice!). See how the main patch object only

[issue18235] _sysconfigdata.py wrong on AIX installations

2014-06-06 Thread Michael Haubenwallner
Michael Haubenwallner added the comment: Hmm... instead of reversing the order while keeping in _generate_posix_vars(), feels like it would have been better to move the code from 2000 back to _init_posix() where it originally was, without changing the order - because now for sysconfig within

[issue21692] Wrong order of expected/actual for assert_called_once_with

2014-06-08 Thread Michael Foord
Michael Foord added the comment: What specifically are you saying is in the wrong order? -- ___ Python tracker <http://bugs.python.org/issue21692> ___ ___ Pytho

[issue21600] mock.patch.stopall doesn't work with patch.dict to sys.modules

2014-06-08 Thread Michael Foord
Michael Foord added the comment: That looks great - thanks! I'll get it committed shortly. -- ___ Python tracker <http://bugs.python.org/issue21600> ___ ___

[issue21692] Wrong order of expected/actual for assert_called_once_with

2014-06-09 Thread Michael Foord
Michael Foord added the comment: As David points out - in your example the "actual call" made is m.some_method('foo', 'bar'). Your assertion (the expectation) is m.some_method.assert_called_once_with('foo', 'baz'). So the traceback is correct

[issue21741] Convert most of the test suite to using unittest.main()

2014-06-16 Thread Michael Foord
Michael Foord added the comment: I haven't reviewed the patch in detail, but I've had a scan through and it looks *great*. A quick and dirty check that it's "correct" is to compare the number of tests run before and after the patch - and if the numbers differ ver

[issue21741] Convert most of the test suite to using unittest.main()

2014-06-16 Thread Michael Foord
Michael Foord added the comment: Those should be turned into mixins, or someone could implement issue 14534. -- ___ Python tracker <http://bugs.python.org/issue21

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

2014-06-17 Thread Michael Foord
Michael Foord added the comment: If you're writing a mixin you don't need to derive from TestCase, you just derive from object. The point of this feature is to allow TestCase subclasses to be "base classes" instead of b

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

2014-06-17 Thread Michael Foord
Michael Foord added the comment: My suggested solution is a class decorator you use on your base class that means "don't run tests from this class". @unittest.base_class class MyTestBase(TestCase): pass Not quite sure how that's sophisticated or confusing... Are yo

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

2014-06-18 Thread Michael Foord
Michael Foord added the comment: Zachary: Inheriting from TestCase in your mixin is actually an anti-pattern. And yes, most people seem to do it (most people seem to misunderstand how to use mixins, which is why I like this approach of having a way of explicitly marking base classes

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

2014-06-18 Thread Michael Foord
Michael Foord added the comment: To be honest, even though I understand it, I find the mixin pattern hard to read. You derive from object, but call methods (the assert methods for example) that don't exist in the class (or its inheritance chain). My experience, with even experienced P

[issue16374] ConfigParser: Passing a semicolon as a value

2012-10-31 Thread Michael Grünewald
Michael Grünewald added the comment: Cannot reproduce that with Ubuntu 12.04. Python 2.7 returned ";" under both Windows 7 and Ubuntu 12.04. Can you verify that there was no space before the semicolon? Otherwise the semicolon gets treated as the beginning of an inli

[issue14266] pyunit script as shorthand for python -m unittest

2012-11-05 Thread Michael Foord
Michael Foord added the comment: A python script should be fine - this is what unittest2 does and I haven't had any requests from Windows users for a binary. -- ___ Python tracker <http://bugs.python.org/is

[issue14174] argparse.REMAINDER fails to parse remainder correctly

2012-11-30 Thread Michael Edwards
Michael Edwards added the comment: I'm attaching my own bug repro script for Eric. Is this sufficient? I can demonstrate the entire resulting Namespace, but the problem is that argparse doesn't even produce a Namespace. The cases I show simply fail. -- nosy: +Michael.Edw

[issue16601] Restarting iteration over tarfile continues from where it left off.

2012-12-03 Thread Michael Birtwell
New submission from Michael Birtwell: If you partially iterate over a tarfile then try and restart iteration of that tarfile it will continue from where it left off rather than restarting from the beginning. I've only tried this with the tarfile implementation in python 2.7 but the 3.x

[issue16601] Restarting iteration over tarfile continues from where it left off.

2012-12-03 Thread Michael Birtwell
Michael Birtwell added the comment: Embarrassingly as soon as I uploaded that patch I found a problem with it. I hadn't taken in to account the special case for the first member. Here's a replacement patch -- type: -> behavior Added file: http://bugs.python.org/file2820

[issue16601] Restarting iteration over tarfile continues from where it left off.

2012-12-03 Thread Michael Birtwell
Michael Birtwell added the comment: Here's a patch on the tarfile's unittest module. -- Added file: http://bugs.python.org/file28203/test-tarfile-restart-iteration.patch ___ Python tracker <http://bugs.python.o

[issue16599] unittest: Access test result from tearDown

2012-12-04 Thread Michael Foord
Michael Foord added the comment: Changing the signature of tearDown would be backwards incompatible. addSuccessCleanup is an interesting idea - cleanup functions that are only executed if the test passes. (What to do if a cleanup function raises an exception though? And when do these get

[issue16599] unittest: Access test result from tearDown

2012-12-04 Thread Michael Foord
Michael Foord added the comment: Well, addSuccessCleanup *would* be an api for adding a cleanup - one that is only called on success. So the cleanup is skipped on failure or error, which was the original use case. "Additional consideration that the need to leave the test results is a use

[issue16614] argparse accepts partial parameters

2012-12-05 Thread Michael Edwards
New submission from Michael Edwards: When running parse_args, ArgumentParser is liberal in accepting parameters. Partial matches will be accepted as arguments (in the included example, --test bob, --tester bob, --testers bob all set the testers argument) Perhaps this is documented, but it

[issue16709] unittest discover order is filesystem specific - hard to reproduce

2012-12-18 Thread Michael Foord
Michael Foord added the comment: Seems reasonable. -- assignee: -> michael.foord ___ Python tracker <http://bugs.python.org/issue16709> ___ ___ Python-bugs-lis

[issue16739] texttestresult should decorate the stream with _WritelnDecorator

2012-12-20 Thread Michael Foord
Michael Foord added the comment: TextTestResult could decorate a raw stream (and not redecorate an already decorated one). -- assignee: -> michael.foord nosy: +michael.foord ___ Python tracker <http://bugs.python.org/issu

[issue16709] unittest discover order is filesystem specific - hard to reproduce

2012-12-25 Thread Michael Foord
Michael Foord added the comment: It smells like a feature to me (it isn't a direct "bug" fix anyway). It can be applied to earlier versions of Python through a new unittest2 release. -- versions: +Python 3.5 -Python 2.7, Python

[issue16796] Fix argparse docs typo: "an special action" to "a special action"

2012-12-27 Thread Michael Schurter
New submission from Michael Schurter: Title says it all; patch has the fix. No need for an ACKS entry -- files: argparse-docs-typo.patch keywords: patch messages: 178348 nosy: schmichael priority: normal severity: normal status: open title: Fix argparse docs typo: "an special actio

[issue16796] Fix argparse docs typo: "an special action" to "a special action"

2012-12-27 Thread Michael Schurter
Changes by Michael Schurter : -- assignee: -> docs@python components: +Documentation nosy: +docs@python ___ Python tracker <http://bugs.python.org/issu

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

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

[issue2128] sys.argv is wrong for unicode strings

2013-01-13 Thread Michael Herrmann
Michael Herrmann added the comment: Hi, is it correct that this bug no longer appears in Python 2.7.3? I checked the changelogs of 2.7, but couldn't find anything. Thanks! Michael -- nosy: +mherrmann.at ___ Python tracker <http://bugs.py

[issue17052] unittest discovery should use self.testLoader

2013-01-28 Thread Michael Foord
Michael Foord added the comment: I think you're correct - although I wonder if *anyone*, *ever* will be helped by the change. :-) -- ___ Python tracker <http://bugs.python.org/is

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

2013-01-28 Thread Michael Foord
Michael Foord added the comment: You mean like mock.ANY ? -- ___ Python tracker <http://bugs.python.org/issue17063> ___ ___ Python-bugs-list mailing list Unsub

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

2013-01-28 Thread Michael Foord
Michael Foord added the comment: Oh, you want the assert_called_with call to *return* the objects compared with the placeholder? Well, mock.ANY already exists and you can pull the arguments out for individual assertions using some_mock.call_args. args, kwargs = some_mock.call_args

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

2013-01-28 Thread Michael Foord
Michael Foord added the comment: Yes there are definitely room for documentation improvements. And, yes - pulling the args out from some_mock.call_args "boils down to doing the matching by hand". You only do it when you *want* to do the matching by hand. Your use case I would wr

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

2013-01-30 Thread Michael Foord
Michael Foord added the comment: Wow, impressive work Antoine - thanks. I am a little concerned that this relies on Python 3 only features of inspect, and *in fact* relies on bug fixes in Python 3.4 to work. That means it would be hard / impossible for the backport "mock" to ha

[issue16997] subtests

2013-01-30 Thread Michael Foord
Michael Foord added the comment: I am concerned that this feature changes the TestResult API in a backwards incompatible way. There are (quite a few) custom TestResult objects that just implement the API and don't inherit from TestResult. I'd like to try this new code with (for ex

[issue16997] subtests

2013-01-30 Thread Michael Foord
Michael Foord added the comment: Note, some brief discussion on the "testing in python" mailing list: http://lists.idyll.org/pipermail/testing-in-python/2013-January/005356.html -- ___ Python tracker <http://bugs.python.o

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