[issue14636] Mock could check for exceptions in side effect list

2012-04-20 Thread Michael Foord
Michael Foord added the comment: Seems like a good change. -- assignee: -> michael.foord ___ Python tracker <http://bugs.python.org/issue14636> ___ ___ Py

[issue7559] TestLoader.loadTestsFromName swallows import errors

2012-04-21 Thread Michael Foord
Michael Foord added the comment: My favoured fix is to catch the exception and generate a failing test that re-raises the *original exception* (with traceback) when run. That way a single failing module doesn't kill a whole test run (although it does mean later feedback about mis

[issue14634] Mock cannot autospec functions with keyword-only arguments.

2012-04-21 Thread Michael Foord
Michael Foord added the comment: This is non-trivial to fix. Although inspect.getfullargspec can be used, which does support keyword only arguments, inspect.formatargspec *doesn't* support them. (mock.create_autospec uses these to rebuild a compatible signature for generated mocks.)

[issue14634] Mock cannot autospec functions with keyword-only arguments.

2012-04-21 Thread Michael Foord
Changes by Michael Foord : -- keywords: -easy ___ Python tracker <http://bugs.python.org/issue14634> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue14634] Mock cannot autospec functions with keyword-only arguments.

2012-04-21 Thread Michael Foord
Michael Foord added the comment: Hmmm... looks like formatargspec does support these features but they aren't documented. If it works out I'll update the docs for inspect.formatargspec too. -- ___ Python tracker <http://bugs.python.o

[issue13857] Add textwrap.indent() as counterpart to textwrap.dedent()

2012-04-22 Thread Michael . Elsdörfer
Changes by Michael.Elsdörfer : -- nosy: +elsdoerfer ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail

[issue14664] Skipping a test mixin gives metaclass error

2012-04-24 Thread Michael Foord
Michael Foord added the comment: Patch looks good - thanks. -- ___ Python tracker <http://bugs.python.org/issue14664> ___ ___ Python-bugs-list mailing list Unsub

[issue14664] Skipping a test mixin gives metaclass error

2012-04-25 Thread Michael Foord
Michael Foord added the comment: This could go into 2.7 too. -- ___ Python tracker <http://bugs.python.org/issue14664> ___ ___ Python-bugs-list mailing list Unsub

[issue14664] Skipping a test mixin gives metaclass error

2012-04-25 Thread Michael Foord
Michael Foord added the comment: Thanks Antoine - much appreciated. -- ___ Python tracker <http://bugs.python.org/issue14664> ___ ___ Python-bugs-list mailin

[issue14558] Documentation for unittest.main does not describe some keyword arguments.

2012-04-30 Thread Michael Foord
Michael Foord added the comment: A good change - thanks Ezio. -- ___ Python tracker <http://bugs.python.org/issue14558> ___ ___ Python-bugs-list mailin

[issue14770] Minor documentation fixes

2012-05-10 Thread Michael Foord
New submission from Michael Foord : A bunch of minor fixes for the documentation suggested by Kurt Robinson to the webmaster email address: Below, you will find 15 snippets from the Python 2.7.2 Library and Extension FAQ (http://docs.python.org/faq/library.html), categorized by problem type

[issue14884] Windows Build instruction typo

2012-05-22 Thread Michael Driscoll
New submission from Michael Driscoll : In http://docs.python.org/devguide/setup.html#windows the devguide mentions that the user must go to the "Build" menu to run "Build Solution". When I tried doing that with Visual C++ 2010 per the instructions, I discovered that there

[issue14884] Windows Build instruction typo

2012-05-22 Thread Michael Driscoll
Michael Driscoll added the comment: @Brian - Sorry I didn't include a screenshot earlier. I was running it on a machine without good screen capturing software. I've rectified that and attached a screenshot for you. I suspect that there's a difference between the VC++ 2010 Expr

[issue14884] Windows Build instruction typo

2012-05-22 Thread Michael Driscoll
Michael Driscoll added the comment: Yeah, my patch didn't turn out the way I expected. I replaced "Build" with "Debug" and then noticed that it also referred to some kind of "build" drop-down that didn't seem like the right term. I couldn't figu

[issue14884] Windows Build instruction typo

2012-05-23 Thread Michael Driscoll
Michael Driscoll added the comment: Here's a new patch that I think addresses both issues. Thanks for your insights. -- Added file: http://bugs.python.org/file25678/setup.patch ___ Python tracker <http://bugs.python.org/is

[issue14884] Windows Build instruction typo

2012-05-23 Thread Michael Driscoll
Michael Driscoll added the comment: @ Eli - Sorry about that. I just went with Brian's wording on that. I didn't realize it was plural. My experience with Visual Studio is limited, although I hope to rectify that at some point. Anyway, I corrected the patch and attached

[issue14884] Windows Build instruction typo

2012-05-23 Thread Michael Driscoll
Michael Driscoll added the comment: Thanks for the tip Eli. I'll try to remember to number my patches next time. This is my first time doing this. -- ___ Python tracker <http://bugs.python.org/is

[issue14668] Document the path option in the Windows installer

2012-05-23 Thread Michael Driscoll
Michael Driscoll added the comment: Looking at 3.3.rst, it looks like we could just add the blurb to the end of the file in the "Other issues" section. The "windows.rst" file is potentially more complicated as I assume we need to leave the directions for adding the path

[issue14901] Python Windows FAQ is Very Outdated

2012-05-24 Thread Michael Driscoll
New submission from Michael Driscoll : I was reading through http://docs.python.org/faq/windows.html and noticed that its examples are based on Python 2.2-2.3 and it only really covers up to Windows 2000 with just a couple mentions of XP. There are also sections in there that I'm not

[issue14901] Python Windows FAQ is Very Outdated

2012-05-24 Thread Michael Driscoll
Changes by Michael Driscoll : -- components: +Windows versions: +Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 3.4 ___ Python tracker <http://bugs.python.org/issue14

[issue14901] Python Windows FAQ is Very Outdated

2012-05-25 Thread Michael Driscoll
Michael Driscoll added the comment: Here are a few proposals that spring to mind: 1a) Update all Windows references to Windows 7 or Vista/7. We can include XP, but I think Microsoft is dropping support next year. 1b) Update all Python references to the current version instead of 2.2 and 2.3

[issue14901] Python Windows FAQ is Very Outdated

2012-05-25 Thread Michael Driscoll
Michael Driscoll added the comment: I know Python 3.x still runs on XP too, but should we continue to mention it in our documentation? I don't know. Part of the reason I wrote up all that was to see if people had any well thought out arguments one way or the other on these things. A

[issue14901] Python Windows FAQ is Very Outdated

2012-05-25 Thread Michael Driscoll
Michael Driscoll added the comment: Should the patch for 1b replace Python 2.2 with Python 2.7/3.2 or just Python 3.2? -- ___ Python tracker <http://bugs.python.org/issue14

[issue14901] Python Windows FAQ is Very Outdated

2012-05-25 Thread Michael Driscoll
Michael Driscoll added the comment: Could we say just Python and ignore the version number? Or would Python 2.7 work for the 2.7 branch patch since there isn't supposed to be a 2.8 and then for Python 3 we could go with 3.x? -- ___ Python tr

[issue14901] Python Windows FAQ is Very Outdated

2012-05-25 Thread Michael Driscoll
Michael Driscoll added the comment: Okay. Here are a couple from http://docs.python.org/faq/windows.html#how-do-i-run-a-python-program-under-windows: "You may also find that you have a Start-menu entry such as Start ‣ Programs ‣ Python 2.2 ‣ Python (command line)" Then just a litt

[issue14971] (unittest) loadTestsFromName does not work on method with a decorator

2012-05-31 Thread Michael Foord
Michael Foord added the comment: Whilst functools.wraps would fix the problem it still sounds like a bug (or at the very least a reasonable feature request). -- ___ Python tracker <http://bugs.python.org/issue14

[issue14957] Improve docs for str.splitlines

2012-06-01 Thread Michael Driscoll
Michael Driscoll added the comment: I'm assuming Nick is talking about the stdtypes.rst (in Doc/library) file, correct? If so, I went ahead and created a simple patch that almost uses his verbiage verbatim. -- keywords: +patch nosy: +michael.driscoll Added file:

[issue14446] Remove deprecated tkinter functions

2012-06-01 Thread Michael Driscoll
Michael Driscoll added the comment: After reading up on both issues, I think I found all the instances that were deprecated and removed them. A patch is attached that includes the edits for tkinter/__init__.py and the _tkinter.c files. -- keywords: +patch nosy: +michael.driscoll

[issue14446] Remove deprecated tkinter functions

2012-06-01 Thread Michael Driscoll
Michael Driscoll added the comment: I just noticed that we'll need to update the Documentation for tkinter too as it mentions the AtEnd etc methods. Do you want me to create a patch for that or a new ticket + patch? -- ___ Python tracker

[issue14446] Remove deprecated tkinter functions

2012-06-02 Thread Michael Driscoll
Michael Driscoll added the comment: Here's the doc patch. The local repo I was using yesterday is on a different computer that I don't have access to today. Hopefully applying two patches is okay. If not, I can redo the other patch and add it to this one. -- Added

[issue15007] Unittest CLI does not support test packages very well

2012-06-05 Thread Michael Foord
Michael Foord added the comment: Whilst I agree in principle... The trouble is that when you do this: python -m unittest test_pk What you are saying is "run all the tests from the test_pk module". You *aren't* launching discovery. This should work: python -m unitt

[issue15024] Split enhanced assertion support out as a unittest.TestCase base class

2012-06-07 Thread Michael Foord
Michael Foord added the comment: Why not just instantiate a TestCase instance and use that? >>> from unittest import TestCase >>> t = TestCase() >>> t.assertEqual('foo', 'bar') Traceback (most recent call last): File "", line 1, in

[issue14971] (unittest) loadTestsFromName does not work on method with a decorator

2012-06-09 Thread Michael Foord
Michael Foord added the comment: Patch looks great - thanks David. -- assignee: docs@python -> michael.foord ___ Python tracker <http://bugs.python.org/issu

[issue14446] Remove deprecated tkinter functions

2012-06-11 Thread Michael Driscoll
Michael Driscoll added the comment: Do I need to do anything else to those patches I submitted? -- ___ Python tracker <http://bugs.python.org/issue14446> ___ ___

[issue14927] add "Do not supply 'int' argument" to random.shuffle docstring

2012-06-11 Thread Michael Driscoll
Michael Driscoll added the comment: I added the extra information to the docstring for the shuffle method and attached a patch. -- keywords: +patch nosy: +michael.driscoll Added file: http://bugs.python.org/file25938/shuffle.patch ___ Python

[issue14966] Fully document subprocess.CalledProcessError

2012-06-11 Thread Michael Driscoll
Michael Driscoll added the comment: I don't see the error, TimeoutExpired, documented either. At least the doc page mentions CalledProcessError a couple times. Do we want to use the docstring for CalledProcessError for the documentation page? Where on the page would it go? I assume we&#

[issue15041] tkinter documentation: update "see also" list

2012-06-11 Thread Michael Driscoll
Michael Driscoll added the comment: I thought the ebook, "Modern Tkinter for Busy Python Developers" by Mark Roseman was pretty good too: http://www.amazon.com/Modern-Tkinter-Python-Developers-ebook/dp/B0071QDNLO/ref=sr_1_1?ie=UTF8&qid=1339446684&sr=8-1 -- nosy:

[issue12982] .pyo file can't be imported unless -O is given

2012-06-12 Thread Michael Herrmann
Michael Herrmann added the comment: Hi, I need to use a third-party library that ships as a mixture of .pyc and .pyo files. I found it a little surprising and inconvenient that I have to set the -O flag just to read .pyo files. I don't mind whether .pyc or .pyo files are being cr

[issue12982] Document that importing .pyo files needs python -O

2012-06-12 Thread Michael Herrmann
Michael Herrmann added the comment: Hi Eric, thank you for your quick reply. I'm not the first one who encounters this problem and in my opinion it is simply counter-intuitive that you cannot read a mixture of .pyo and .pyc files. That is why I think that my proposed change is valuabl

[issue12982] Document that importing .pyo files needs python -O

2012-06-12 Thread Michael Herrmann
Michael Herrmann added the comment: Dear Eric OL, I see - I had read your e-mail but because of the similar names I thought the message here was yours too, and thus only replied once. I apologize! I can of course find a workaround such as renaming .pyo to .pyc. However, I would like to

[issue12982] Document that importing .pyo files needs python -O

2012-06-14 Thread Michael Herrmann
Michael Herrmann added the comment: That is *exactly* my point :) -- ___ Python tracker <http://bugs.python.org/issue12982> ___ ___ Python-bugs-list mailin

[issue14215] http://www.python.org/dev/peps/ title is python.org

2012-06-17 Thread Michael Foord
Michael Foord added the comment: As the PEPs are "development docs", like the Python documentation itself, I wouldn't have *expected* it to be covered by the redesign. Does this require anything more than an update to the PEP

[issue1251] ssl module doesn't support non-blocking handshakes

2012-06-28 Thread Michael Gundlach
Michael Gundlach added the comment: I recently started getting what appears to be this bug in 2.6.6 and 2.7.3 when connecting to Google. My script does this: while True: get an IMAP connection to Google, if our old one timed out fetch unread messages. if any: make an SMTP

[issue15219] Leak in "_hashlib.new()" if argument is not a string

2012-06-28 Thread Michael Fötsch
New submission from Michael Fötsch : If the "name" argument to "_hashlib.new()" is not a string, the reference count for the "string" argument is not decremented. In the file "Modules/_hashopenssl.c", function "EVP_new()", a call to &q

[issue15219] Leak in "_hashlib.new()" if argument is not a string

2012-06-28 Thread Michael Fötsch
Michael Fötsch added the comment: The change is against the 2.7 branch. The 3.2 branch is not affected. -- ___ Python tracker <http://bugs.python.org/issue15

[issue15323] Provide target name in output message when Mock.assert_called_once_with fails

2012-07-11 Thread Michael Foord
Michael Foord added the comment: Looks good, thanks. -- assignee: -> michael.foord nosy: +michael.foord ___ Python tracker <http://bugs.python.org/issu

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

2012-07-15 Thread Michael Foord
Michael Foord added the comment: A method on TestCase that *just* executes the test method - allowing for overriding in subclasses - is an interesting idea. Including setUp and tearDown would be harder because TestCase necessarily does a bunch of bookkeeping between each of these steps

[issue15400] int('12345L', 10) raises ValueError

2012-07-19 Thread Michael Smith
New submission from Michael Smith : The trailing 'L' in representations of long integers causes the int function to raise a ValueError. This is unexpected because it's reasonable to expect that `int` should be able to parse a number from any string when that string represented

[issue9161] add_option in optparse no longer accepts unicode string

2012-07-27 Thread Michael Johnson
Michael Johnson added the comment: Created a unit test for the patch that was committed in r82581. I can easily add the test to argparse too, if needed; I didn't see any tests related to Unicode in there. -- nosy: +mjjohnson ___ Python tr

[issue15551] Unit tests that return generators silently fail

2012-08-03 Thread Michael Foord
Michael Foord added the comment: unittest calls test methods to execute tests. Generator functions do nothing (except create a generator) when you call them. Test methods as generators therefore do nothing in unittest. -- resolution: -> invalid stage: -> committed/rejected

[issue15551] Unit tests that return generators silently fail

2012-08-03 Thread Michael Foord
Michael Foord added the comment: It's not a game. Have a test method as a generator function is clearly programmer error. Doing nothing is the expected behaviour. -- ___ Python tracker <http://bugs.python.org/is

[issue15551] Unit tests that return generators silently fail

2012-08-03 Thread Michael Foord
Michael Foord added the comment: It's the expected behaviour according to the unittest specification. -- ___ Python tracker <http://bugs.python.org/is

[issue9161] add_option in optparse no longer accepts unicode string

2012-08-13 Thread Michael Johnson
Michael Johnson added the comment: Huh, let me try that again! I'm not sure how the attachment got dropped. -- keywords: +patch Added file: http://bugs.python.org/file26793/issue9161_test.diff ___ Python tracker <http://bugs.python.org/i

[issue8943] Bug in InteractiveConsole

2012-08-20 Thread Michael Dorman
Michael Dorman added the comment: I'd suggest this is an issue in the doc for the InteractiveInterpreter class. Try locals=global() and your problem goes away. (namespace == __main__)... -- keywords: +patch nosy: +mjdorma Added file: http://bugs.python.org/file26917/issue8943

[issue8943] Bug in InteractiveConsole

2012-08-20 Thread Michael Dorman
Changes by Michael Dorman : -- nosy: +ncoghlan ___ Python tracker <http://bugs.python.org/issue8943> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue10076] Regex objects became uncopyable in 2.5

2012-08-27 Thread Michael Shields
Michael Shields added the comment: It's not strictly necessary that re objects be copyable, but there's no reason to break it either. It's not strictly necessary that str or int be copyable either. This came up in code that had objects with a number of members, one of whic

[issue15836] unittest assertRaises should verify excClass is actually a BaseException class

2012-09-01 Thread Michael Foord
Michael Foord added the comment: Yep, certainly worth fixing. When 3.3 is out the door I will look at applying this to all branches. -- ___ Python tracker <http://bugs.python.org/issue15

[issue15891] A public facing API for __unittest = True

2012-09-09 Thread Michael Foord
Michael Foord added the comment: Whatever we do must be backwards compatible. The question is, is a better api that doesn't use stack frames (which is a hack in my opinion) even possible? -- ___ Python tracker <http://bugs.python.org/is

[issue15860] Use TestCase assertion methods in unittest.mock.assert* to make them easier to read

2012-09-11 Thread Michael Foord
Michael Foord added the comment: Yep, interesting idea. In Python 3 you can't import unittest.mock without importing unittest, so there could even be a "default testcase" to fall back on. For the external release I'd rather not have unittest as a dependency, but allow

[issue15860] Use TestCase assertion methods in unittest.mock.assert* to make them easier to read

2012-09-11 Thread Michael Foord
Michael Foord added the comment: The only issue is that the testcase would have to be propagated to child mocks too. -- ___ Python tracker <http://bugs.python.org/issue15

[issue11664] Add patch method to unittest.TestCase

2012-09-17 Thread Michael Foord
Michael Foord added the comment: Why would mock.patch.object be the appropriate one to add to TestCase? patch.object is used orders of magnitude less than patch. -- ___ Python tracker <http://bugs.python.org/issue11

[issue15836] unittest assertRaises should verify excClass is actually a BaseException class

2012-09-18 Thread Michael Foord
Michael Foord added the comment: The patch is just waiting for me to look over it and commit. I'll get to it ASAP. -- ___ Python tracker <http://bugs.python.org/is

[issue11664] Add patch method to unittest.TestCase

2012-09-18 Thread Michael Foord
Michael Foord added the comment: Well, people vote with their code and find mock.patch vastly more useful than patch.object... -- ___ Python tracker <http://bugs.python.org/issue11

[issue11664] Add patch method to unittest.TestCase

2012-09-19 Thread Michael Foord
Michael Foord added the comment: It maybe that patch.object is a more natural interface to the small sample of people commenting here, in which case great - that's what it's there for. However in common usage patch is used around two orders of magnitude more. I've seen large

[issue11664] Add patch method to unittest.TestCase

2012-09-19 Thread Michael Foord
Michael Foord added the comment: I think those guidelines are horrible and I've told the pyramid folks that. There is a related issue for unittest that failing to import a test module (due to a failed import in the test module for example) should not kill the test run but should cre

[issue1927] raw_input behavior incorrect if readline not enabled

2012-09-23 Thread Michael Domingues
Michael Domingues added the comment: The code that dictates this behavior is in /Parser/myreadline.c and has not been rectified yet in either Python 2.7 (http://hg.python.org/cpython/file/bfdf366a779a/Parser/myreadline.c#l107) or the default branch (http://hg.python.org/cpython/file

[issue1927] raw_input behavior incorrect if readline not enabled

2012-09-23 Thread Michael Domingues
Michael Domingues added the comment: Also uploading a patch for the Python3.2 branch. -- Added file: http://bugs.python.org/file27270/promptOutputFix3.patch ___ Python tracker <http://bugs.python.org/issue1

[issue15280] Don't use builtins as variable names in urllib.request

2012-09-28 Thread Michael Foord
Michael Foord added the comment: Code cleanups for their own sake sound like a good thing, *iff* the cleanup is worthwhile (for example it makes debugging easier). i.e. the cleanup isn't "gratuitous" but worthwhile. This seems to be the case here and the rejected patch in i

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

2012-09-28 Thread Michael Foord
Michael Foord added the comment: So on OS X (Python 2.7 only) the following still fails: PYTHONIOENCODING=ascii ./python.exe unicodetest.py --verbose -- ___ Python tracker <http://bugs.python.org/issue10

[issue11798] Test cases not garbage collected after run

2012-09-28 Thread Michael Foord
Changes by Michael Foord : -- versions: +Python 3.4 -Python 2.7, Python 3.2 ___ Python tracker <http://bugs.python.org/issue11798> ___ ___ Python-bugs-list mailin

[issue16064] unittest -m claims executable is "python", not "python3"

2012-09-28 Thread Michael Foord
Michael Foord added the comment: Yes it is for nicer help output, and a comment in the code is certainly warranted. -- ___ Python tracker <http://bugs.python.org/issue16

[issue14295] PEP 417: adding mock module

2012-09-28 Thread Michael Foord
Michael Foord added the comment: unittest.mock addition is complete. -- resolution: -> fixed stage: -> committed/rejected status: open -> closed ___ Python tracker <http://bugs.python.or

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

2012-09-28 Thread Michael Foord
Michael Foord added the comment: Fixed in 2.7, 3.2 and 3.3.1. -- resolution: -> fixed stage: -> committed/rejected status: open -> closed ___ Python tracker <http://bugs.python.or

[issue15593] urlparse.parse_qs documentation wrong re: urlencode

2012-09-28 Thread Michael Foord
Michael Foord added the comment: UTF-16 patches are relatively unusual... -- nosy: +michael.foord ___ Python tracker <http://bugs.python.org/issue15593> ___ ___

[issue15323] Provide target name in output message when Mock.assert_called_once_with fails

2012-09-28 Thread Michael Foord
Michael Foord added the comment: Eric: yes, patch sets the name on the mock objects it creates. A mock only knows its direct name, not its full 'dotted' name (i.e. a mock knows it is called 'time' but not that it is 'time.time'). It is possible (but harder) to

[issue13476] Simple exclusion filter for unittest autodiscovery

2012-09-30 Thread Michael Foord
Changes by Michael Foord : -- assignee: -> michael.foord ___ Python tracker <http://bugs.python.org/issue13476> ___ ___ Python-bugs-list mailing list Unsubscri

[issue16106] antigravity tests

2012-10-02 Thread Michael Foord
Michael Foord added the comment: What happens if test_geohash runs first? It looks like test_antigravity will only pass if it is run first. You could remove the order dependence by ensuring antigravity is not in sys.modules. sys.modules.pop('antigravity&#

[issue11798] Test cases not garbage collected after run

2012-10-02 Thread Michael Foord
Michael Foord added the comment: The patch looks good to me, although there probably needs to be a note in the TestSuite docs too. I'll apply this to Python 3.4, which leaves plenty of time for people to object. Note that people needing the old behaviour can subclass TestSuite and prov

[issue16162] Py_FileSystemDefaultEncoding should be updated on locale.setlocale()

2012-10-08 Thread Michael Vogt
New submission from Michael Vogt: The Py_FileSystemDefaultEncoding is very static right now and only set on interpreter statup AFAICT. There appears to be no way to switch that later. I think that Py_FileSystemDefaultEncoding should get updated when locale.setlocale() is run automatically and

[issue16171] "do nothing" load_tests could be improved

2012-10-09 Thread Michael Foord
Michael Foord added the comment: Yes the version of load_tests you show is better. However there is an outstanding issue to fix the load_tests protocol to work with pattern=None which is a better fix. (I think this is a bug in load_tests rather than a doc issue really.) Issue 11218

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

2012-10-09 Thread Michael Foord
Michael Foord added the comment: Changing the docs to the following fixes the original reported issue: def load_tests(loader, standard_tests, pattern): # top level directory cached on loader instance this_dir = os.path.dirname(__file__) pattern = pattern or "test

[issue16164] there is no easy way to force unittest.main to use stdout rather than stderr

2012-10-09 Thread Michael Foord
Michael Foord added the comment: Unfortunately subclassing core components is the *intended* mechanism for customising unittest behaviour. Changing this is possible, but is a big job with very extensive changes. I don't think this request is *invalid* per-se, but it isn't some

[issue16162] Py_FileSystemDefaultEncoding should be updated on locale.setlocale()

2012-10-09 Thread Michael Vogt
Michael Vogt added the comment: Thanks for this detailed explaination! I will workaround this outside of python (that is easy ;) - I just thought that it would be a good idea to be able to change the fsencoding (and therefore send the patch), but in the light of e.g. sys.path it seems to be

[issue16288] TextTestResult uses TestCase.__str__() which isn't customisable (vs id() or shortDescription())

2012-10-21 Thread Michael Foord
Changes by Michael Foord : -- assignee: -> michael.foord ___ Python tracker <http://bugs.python.org/issue16288> ___ ___ Python-bugs-list mailing list Unsubscri

[issue16288] TextTestResult uses TestCase.__str__() which isn't customisable (vs id() or shortDescription())

2012-10-21 Thread Michael Foord
Michael Foord added the comment: So three including str sounds sufficient to me: short description, long description and repr (with str == repr) for debugging. -- ___ Python tracker <http://bugs.python.org/issue16

[issue15132] Let unittest.TestProgram()'s defaultTest argument be a list

2012-10-24 Thread Michael Foord
Changes by Michael Foord : -- assignee: -> michael.foord ___ Python tracker <http://bugs.python.org/issue15132> ___ ___ Python-bugs-list mailing list Unsubscri

[issue16312] New command line option supported by unittest.main() for running initialization code before tests

2012-10-26 Thread Michael Foord
Michael Foord added the comment: I would do this with a module level (global) flag as to whether the initial set up has been done and a BaseTestCase class that checks this flag and calls a set up function if it hasn't been done yet (and then sets the

[issue16312] New command line option supported by unittest.main() for running initialization code before tests

2012-10-26 Thread Michael Foord
Changes by Michael Foord : -- assignee: -> michael.foord ___ Python tracker <http://bugs.python.org/issue16312> ___ ___ Python-bugs-list mailing list Unsubscri

[issue16312] New command line option supported by unittest.main() for running initialization code before tests

2012-10-27 Thread Michael Foord
Michael Foord added the comment: @piotr Yes, protecting the set up with a lock would be easy, although unittest doesn't directly support running tests in parallel anyway. -- ___ Python tracker <http://bugs.python.org/is

[issue16312] New command line option supported by unittest.main() for running initialization code before tests

2012-10-28 Thread Michael Foord
Michael Foord added the comment: I always solve the logging problem with test-development-production configuratins and ensuring that running tests imports the logging setup. I've never wanted / needed to configure logging from the command

[issue16312] New command line option supported by unittest.main() for running initialization code before tests

2012-10-29 Thread Michael Foord
Michael Foord added the comment: Is this logging specific issue an actual problem or a theoretical problem? It's not a problem I've ever seen (myself), nor the one the issue was opened for. -- ___ Python tracker <http://bugs.python.o

[issue12890] cgitb displays tags when executed in text mode

2012-10-29 Thread Michael Dorman
Michael Dorman added the comment: Patch (p12890-2.diff) successfully tested on Windows 7 64. No regressions. -- nosy: +mjdorma ___ Python tracker <http://bugs.python.org/issue12

[issue15436] __sizeof__ is not documented

2012-10-29 Thread Michael Dorman
Changes by Michael Dorman : -- nosy: +mjdorma ___ Python tracker <http://bugs.python.org/issue15436> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue20943] configparser - add 'getDict' function

2014-03-16 Thread Michael Müller
New submission from Michael Müller: It would be nice to have a 'getDict' function in the configparser lib. Adding that function would be simply def getDict(self, *args): return dict([entry for entry in self.items(*args)]) inside the RawConfigParser class next to the

[issue20968] mock.MagicMock does not mock __truediv__

2014-03-19 Thread Michael Foord
Michael Foord added the comment: A test would be nice please (good catch on the bug). -- ___ Python tracker <http://bugs.python.org/issue20968> ___ ___ Python-bug

[issue20968] mock.MagicMock does not mock __truediv__

2014-03-19 Thread Michael Foord
Michael Foord added the comment: Well, as this is a regression fix we definitley need a test. Ideally we would test all the operations - I didn't realise that only add was tested! However for this specific issue, just testing division is fine, and yes testing in place and right hand as

[issue17846] Building Python on Windows - Supplementary info

2014-04-01 Thread michael kearney
michael kearney added the comment: Observation: Tools\buildbot\build.bat solves all the problems I was having. That is to say, a single command exists to build python on windows w/o problems. It has worked since at least since python 3.3.1, which I think preceded my original submission

[issue21133] unittest discover should allow option to run each package separately

2014-04-04 Thread Michael Foord
Michael Foord added the comment: This is only an issue if a test package pollutes its environment without cleaning up (puts mocks in place that it doesn't remove for example). Fixing this would require discover to use multiple processes to run tests, which isn't going to happen (at

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

2014-04-14 Thread Michael Foord
Michael Foord added the comment: Can you explain why we need to check for the call_count here? I don't understand why this is needed. -- ___ Python tracker <http://bugs.python.org/is

[issue20968] mock.MagicMock does not mock __truediv__

2014-04-14 Thread Michael Foord
Michael Foord added the comment: Thanks! -- assignee: -> michael.foord resolution: -> fixed stage: -> committed/rejected status: open -> closed ___ Python tracker <http://bugs.python

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