Changes by Robert Collins :
--
versions: +Python 3.5, Python 3.6
___
Python tracker
<http://bugs.python.org/issue24168>
___
___
Python-bugs-list mailing list
Unsub
Robert Collins added the comment:
Parameters please, TestCase has nothing to do with this - it really shouldn't
even have the method.
--
___
Python tracker
<http://bugs.python.org/is
Robert Collins added the comment:
"say, something to run a test until failure, or to
watch for reference leaks, or to run tests in multiple processes :-))"
I think a few complimentary things.
unittest extensability currently requires a new CLI entry point for each thing.
I'd l
Robert Collins added the comment:
Personally I'm very skeptical of all the multi-test setup facilties because of
the very poor interactions with parallel testing that this basic approach has.
But - we haven't yet brought in something sensible to let us deprecate
setUpModule and setU
Robert Collins added the comment:
Thanks for the patch!
--
resolution: -> fixed
stage: needs patch -> resolved
status: open -> closed
___
Python tracker
<http://bugs.python.or
Changes by Robert Collins :
--
stage: needs patch -> commit review
___
Python tracker
<http://bugs.python.org/issue2786>
___
___
Python-bugs-list mai
Robert Collins added the comment:
Ok, so this is still in the noise space - it might be useful, it might not. Do
we have reports of machines failing to run the test suite (that are also
usefully big enough to compile Python and use it
Robert Collins added the comment:
I don't know if or when it was moved, but right now:
./python -m pydoc unittest.case.TestCase.assertLogs
... the docs for it.
--
___
Python tracker
<http://bugs.python.org/is
Robert Collins added the comment:
Hi, just to say - I'm happy to help steer this through. I think its an
important ecosystem fixup.
--
nosy: +rbcollins
___
Python tracker
<http://bugs.python.org/is
Robert Collins added the comment:
On testing this - I don't think subprocess tests are necessarily needed.
The scenarios are these (from Nick's comment):
Test frameworks.
- there are two in the standard library. unittest and doctest.
- unittest's code paths end up going throu
Robert Collins added the comment:
Ok, so this is an API and ABI change. I'm going to do a variant without that
downside.
--
___
Python tracker
<http://bugs.python.org/i
Robert Collins added the comment:
And herewith.
--
Added file: http://bugs.python.org/file40250/issue-2786-1.patch
___
Python tracker
<http://bugs.python.org/issue2
Robert Collins added the comment:
Forgot docs - I'll do before committing, but not worried about review of them
so much.
--
___
Python tracker
<http://bugs.python.org/i
Robert Collins added the comment:
@ezio - you seem busy, so I'll commit this next week if its still pending.
--
___
Python tracker
<http://bugs.python.org/is
Robert Collins added the comment:
This itself is fixed.
--
resolution: -> fixed
stage: -> resolved
status: open -> closed
___
Python tracker
<http://bugs.python.or
Changes by Robert Collins :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
versions: +Python 3.6 -Python 3.5
___
Python tracker
<http://bugs.python.or
Changes by Robert Collins :
--
stage: patch review -> commit review
___
Python tracker
<http://bugs.python.org/issue23183>
___
___
Python-bugs-list mai
Changes by Robert Collins :
--
stage: patch review -> commit review
___
Python tracker
<http://bugs.python.org/issue21112>
___
___
Python-bugs-list mai
Robert Collins added the comment:
def main():
try:
thing()
except SomethingChanged:
exit(1)
except BinaryDiff:
exit(2)
except:
exit(3)
This is the sort of pattern e.g. 'diff' has.
Should exit(3) there become exit(1) ? exit(1) means 'succ
Robert Collins added the comment:
Right. So I think one could also propose that the default exception handling
should also change to this new number, but it is a different situation -
programs don't conflict with that - they allow it to bubble up, but this
situation is outside its co
Robert Collins added the comment:
2.7 is sufficiently different that I haven't backported this there - plus the
report said it was introduced in 3.4. If someone can show this doesn't work in
2.7 and also supply a patch, we could appl
Changes by Robert Collins :
--
resolution: -> fixed
stage: commit review -> resolved
status: open -> closed
___
Python tracker
<http://bugs.python.or
Robert Collins added the comment:
Here are some options.
a) Don't make the new thing public - instead export within Python.exe the
existing private symbol _...withNames. Pros: no change to public API. Cons:
extension modules using the public API cannot make these sorts of errors
cleare
Robert Collins added the comment:
It seems to me that how, and when, Python exits the process is important to
folk who will never ever touch the C API.
--
___
Python tracker
<http://bugs.python.org/issue5
Robert Collins added the comment:
Hmm, I think we can fix this. Its leaking due to the use of a helper I think.
So - we should just fix this [and add a test, since clearly the test coverage
is insufficient]
--
___
Python tracker
<h
Robert Collins added the comment:
wouldn't changing walk_stack to add one more f_back be better? Seems odd to
work around it...
--
___
Python tracker
<http://bugs.python.org/is
Robert Collins added the comment:
LGTM too.
--
___
Python tracker
<http://bugs.python.org/issue25111>
___
___
Python-bugs-list mailing list
Unsubscribe:
Robert Collins added the comment:
The fix is appropriate (we might want to think about symlinks in the future).
I'd very much like a test for it (in Lib/unittest/test/test_discovery.py) and
it should be applied to 3.5, master - older versions had this wrapped up in
simpler code and won
Robert Collins added the comment:
@Serhiy, EXIT_FAILURE is used in Python's C code itself (just once admittedly,
and then we use 0 sometimes for success and sometimes for errors, and then 1
for errors... aiee.)
FWIW to the extent that folk want to write posix code in Python, I'
Robert Collins added the comment:
@Martin I was wrong re: the defs - they only cover function vs data, not return
codes. So it looks fine to me.
--
___
Python tracker
<http://bugs.python.org/issue5
Robert Collins added the comment:
So in general:
https://www.gnu.org/software/autoconf/manual/autoconf-2.69/html_node/System-Type.html#System-Type
and
https://www.gnu.org/software/autoconf/manual/autoconf-2.69/html_node/Hosts-and-Cross_002dCompilation.html
There are three platforms in play
Robert Collins added the comment:
I'd rather make this super simple: just terminate the test run immediately. We
can catch KeyBoardInterrupt in the UI layer to still permit outputting summary
information. That removes one more source of global state that makes testing
fr
Robert Collins added the comment:
Python has stopped supporting .pyc-only distributions - see
https://www.python.org/dev/peps/pep-3147/#case-3-pycache-foo-magic-pyc-with-no-source
- and so, while what you are seeing is inconsistent with import in some older
python's, it is not a bug in
Robert Collins added the comment:
Sorry, I missed the little footnote on case 4 about still supporting
source-less distributions. I guess in that context we do still need to support
this.
However - please check that this does indeed happen on Python master - 3.6.
unittest does evolve and if
Robert Collins added the comment:
@mbussonn - I don't see an updated non-tty-checking patch from you?
--
___
Python tracker
<http://bugs.python.org/is
Robert Collins added the comment:
I think we should close this again: if you subclass something you need to
implement the full public API. raw has been in that API since 2010!.
It's a shame that folk have been implementing just-enough, rather than the
actual API, but I don't see th
Robert Collins added the comment:
The new output seems ok to me?
--
___
Python tracker
<http://bugs.python.org/issue19217>
___
___
Python-bugs-list mailin
Robert Collins added the comment:
Thanks for the patch; reviewed in rietvald.
--
___
Python tracker
<http://bugs.python.org/issue24780>
___
___
Python-bugs-list m
Robert Collins added the comment:
Hmm, I haven't looked closely, but some high level thoughts.
I'm worried about making mock too complex here. We already say folk should use
a VFS for complex file based tests, and there's quite a chunk of code you're
adding - perhaps bett
Robert Collins added the comment:
Can we just stop running the test suite directly?
python -m unittest test.test_traceback
should work fine and as quickly, ... I'd like to delete all the __main__ in the
test suite as cruft TBH.
The patch would be ok if ugly, its a bit of a magic number
Robert Collins added the comment:
What version of python are you testing with? unittest 2.7 has a number of bugs
vis-a-vis namespaces and discovery. If you're testing with less than 3.5, or
perhaps 3.6, please try with unittest2, which has the same fixes as the stdlib
uni
Robert Collins added the comment:
@Serhiy care to commit it?
--
___
Python tracker
<http://bugs.python.org/issue20556>
___
___
Python-bugs-list mailing list
Unsub
Robert Collins added the comment:
The context manager errors if *nothing* matches, not if *everything* matches,
which is very different to catch_warnings because the filters are used to
*exclude* warnings, and excess warnings are errors there.
Because of that, there's little if any reas
Robert Collins added the comment:
Hmm, this is a little surprising, but - why are you raising AssertionError like
that - thats what assertRaises is for.
--
stage: -> needs patch
___
Python tracker
<http://bugs.python.org/issu
Robert Collins added the comment:
I don't think we make any guarantees for or against references, but - we
attempt to free references already (see how we call clear_frames), so this is a
bug, pure and simple.
--
___
Python tracker
Robert Collins added the comment:
@serhiy, how is that different to what I said?
--
___
Python tracker
<http://bugs.python.org/issue25783>
___
___
Python-bug
Robert Collins added the comment:
So this test script is making a 65K entry dict, and each item is a new,
separate 65K string. The strings are allocated in single chunks, so we should
expect couple hundred reference count writes total.
AIUI involuntary context switches occur when there is
Robert Collins added the comment:
Thanks for the patch; the test may be redundant but not enough to matter for
now - and the bug really doth need fixing, so I've applied it as-is.
--
resolution: -> fixed
stage: patch review -> resolved
status: ope
Robert Collins added the comment:
sih4sing5hong5 - I think we do need a test in fact - it can be done using
mocks, but right now I think the patch has a bug - it looks for isidentifier on
$thing.py, but not on just $thing (which we need to do to handle packages, vs
modules
Robert Collins added the comment:
The basic model is this:
- a test can have a single outcome [yes, the api is ambiguous, but there it is]
- subtests let you identify multiple variations of a single test (note the id
tweak etc) and *may* be reported differently
We certainly must not report
Robert Collins added the comment:
I think this is a valid mock bug; it likely needs some thoughtful exhaustive
testing, and obviously support added for it.
--
stage: -> test needed
title: unittest.mock does not wrap dict objects correctly -> unittest.mock does
not wrap dunder m
Robert Collins added the comment:
Yes, it is... ish.
The frame skipping code occurs when we serialise exceptions, and we pass a
limit in. The limit is calculated on the main exception only. If the cause has
a longer exception than the limit we calculated, you'd see this behaviour.
Pro
Robert Collins added the comment:
I'm fairly sure its eating the stack frames because the calling frames are
annotated __unittest__ - its technically a feature :/.
--
title: unittest swallows part of stack trace when raising AssertionError in a
TestCase -> unittest swallows
Changes by Robert Collins :
--
stage: needs patch -> test needed
___
Python tracker
<http://bugs.python.org/issue24959>
___
___
Python-bugs-list mailing list
Un
New submission from Robert Collins:
>>> import unittest.mock
>>> o = unittest.mock.mock_open(read_data="fred")
>>> f = o()
>>> f.read()
'fred'
>>> f.read()
''
>>> f.readlines()
[]
>>> f.readline()
Tra
Robert Collins added the comment:
Thanks Yolanda, that looks sane - could you perhaps add a test for this in
Lib/unittest/tests/test_mock/ ?
--
___
Python tracker
<http://bugs.python.org/issue26
Robert Collins added the comment:
Thanks Yolanda. I've touched up the test a little and run a full test run (make
test) - sadly it fails: there is an explicit test that StopIteration gets
raised if you set it as a side e
Robert Collins added the comment:
You're changing _mock_call but readline is actually implemented in
_readline_side_effect - just changing that should be all thats needed (to deal
with StopIteration). You will however need to fixup the return values since the
test I added is a bit wider
Robert Collins added the comment:
Could you please add a test case.
--
nosy: +rbcollins
stage: patch review -> test needed
___
Python tracker
<http://bugs.python.org/issu
Robert Collins added the comment:
./python Lib/unittest/test/testmock/testmock.py
..s.
--
Ran 80 tests in 0.180s
OK (skipped=1)
So thats great. I am
Robert Collins added the comment:
Actually, further inspection and a teddybear with Angus Lees uncovers this:
diff --git a/Lib/unittest/test/testmock/testmock.py
b/Lib/unittest/test/testmock/testmock.py
--- a/Lib/unittest/test/testmock/testmock.py
+++ b/Lib/unittest/test/testmock/testmock.py
Robert Collins added the comment:
So something like
for line in _state[0]:
yield line
while True:
yield ''
Will probably do it just fine.
--
___
Python tracker
<http://bugs.python.o
Robert Collins added the comment:
I've committed a minimal variation - thanks for the patches.
--
resolution: -> fixed
stage: test needed -> resolved
status: open -> closed
___
Python tracker
<http://bugs.pyth
Robert Collins added the comment:
LGTM too
--
___
Python tracker
<http://bugs.python.org/issue27063>
___
___
Python-bugs-list mailing list
Unsubscribe:
Robert Collins added the comment:
I don't particularly like either name FWIW :) - but sure, we can add a
different name and deprecate assertCountEqual - but before we do anything lets
look up the previous issue where the rename was
Robert Collins added the comment:
Ok, all changes applied, lets see how this looks to folk.
--
Added file: http://bugs.python.org/file38324/issue17911-5.patch
___
Python tracker
<http://bugs.python.org/issue17
Changes by Robert Collins :
Added file: http://bugs.python.org/file38325/issue17911-6.patch
___
Python tracker
<http://bugs.python.org/issue17911>
___
___
Python-bug
Robert Collins added the comment:
And now updated to HEAD as 17911 has been committed.
--
Added file: http://bugs.python.org/file38332/issue-22936-3.patch
___
Python tracker
<http://bugs.python.org/issue22
Changes by Robert Collins :
Removed file: http://bugs.python.org/file38332/issue-22936-3.patch
___
Python tracker
<http://bugs.python.org/issue22936>
___
___
Python-bug
Changes by Robert Collins :
Added file: http://bugs.python.org/file38333/issue-22936-3.patch
___
Python tracker
<http://bugs.python.org/issue22936>
___
___
Python-bug
New submission from Robert Collins:
make patchcheck depends on the interpreter and modules being built to work
correctly but the make target doesn't have this expressed. This simple patch
will fix it and adds well under a second of latency for me.
cpython.hg$ make patchcheck
./python ./
Robert Collins added the comment:
Thats really strange, I did a ./python -m test run before committing - the
brown bag was due to me running with the patch for 22936 also applied. Looking
into the failures reported now.
--
___
Python tracker
<h
Robert Collins added the comment:
Ok, cgitb - its passing a string instead of an exception type into
format_exception - something that was never supported - it only works by
accident AFAICT, because the old format code was ignoring the etype - it was
deriving the type from the value. Thats
Robert Collins added the comment:
Also apologies - ned told me on IRC that python -m test -uall is needed, not
just -m test. Doh.
--
___
Python tracker
<http://bugs.python.org/issue17
Robert Collins added the comment:
code module is using a _function from within the traceback module to filter out
a frame - we can do that with the new interface easily (it filters the first
tem).
--
___
Python tracker
<http://bugs.python.
Robert Collins added the comment:
The decimal failure is due to _format_final_exc_line now filtering out 'None'
as well, because the string captured values of objects leads to None -> 'None'
before we do rendering.
I think in this case its reasonable to change the behav
Robert Collins added the comment:
Fixes for buildbots.
--
Added file: http://bugs.python.org/file38335/issue-19711-8.patch
___
Python tracker
<http://bugs.python.org/issue17
Changes by Robert Collins :
Added file: http://bugs.python.org/file38336/issue-22936-4.patch
___
Python tracker
<http://bugs.python.org/issue22936>
___
___
Python-bug
Robert Collins added the comment:
Storing a marker in module objects which can be used to validate the linecache
is a good idea. timestamp isn't appropriate because of modules loaded from zips
or dynamic generation. I'd suggest we make it something opaque - we get source
code by
Robert Collins added the comment:
No worries. BTW there is one more patch needed to close this issue - adding the
feature to unittest. I'm working that up now.
--
___
Python tracker
<http://bugs.python.org/is
Robert Collins added the comment:
And the unittest patch.
--
Added file: http://bugs.python.org/file38348/issue-22936-5.patch
___
Python tracker
<http://bugs.python.org/issue22
Changes by Robert Collins :
Removed file: http://bugs.python.org/file38348/issue-22936-5.patch
___
Python tracker
<http://bugs.python.org/issue22936>
___
___
Python-bug
Changes by Robert Collins :
Added file: http://bugs.python.org/file38349/issue-22936-5.patch
___
Python tracker
<http://bugs.python.org/issue22936>
___
___
Python-bug
Robert Collins added the comment:
Yes, for debugging etc this can be very useful. I suggest further extending the
new traceback interface to allow a filtering/transform hook of some sort, to
allow folk more granular control than just repr overloading.
--
nosy: +rbcollins
Robert Collins added the comment:
Test looks good to me. Do you want to apply it?
--
___
Python tracker
<http://bugs.python.org/issue21112>
___
___
Python-bug
Robert Collins added the comment:
Looking at the regression now.
--
___
Python tracker
<http://bugs.python.org/issue17911>
___
___
Python-bugs-list mailin
Robert Collins added the comment:
I suspect that this is due to a list being passed in that wasn't created by
traceback, in the older tuple-only format. That was meant to work, but possibly
is being short circuited somewhere. Shall fix
Robert Collins added the comment:
Ah, idle is being somewhat naughty. It's taking the original traceback and then
mangling the contents in-place, which is preserving the type information, and
throwing off StackSummary.from_list. We can and should make the new code deal
with this in case
Robert Collins added the comment:
And here is a patch, since this is a regression I'll apply it tomorrow (or
sooner if it gets reviews :))
--
keywords: +patch
Added file: http://bugs.python.org/file38503/issue-23631-1.patch
___
Python tracker
Robert Collins added the comment:
Oh, meant to add - we could just call logging.warning or something.
--
___
Python tracker
<http://bugs.python.org/issue8
Robert Collins added the comment:
Oh, it may be clear to everyone already but its perhaps worth noting: there are
two ways the cache can skew.
(older source): We may have a newer file compiled and in use and the older
source in the cache.
e.g. someone calls linecache.getlines(foo.py), then
Changes by Robert Collins :
--
resolution: -> fixed
status: open -> closed
___
Python tracker
<http://bugs.python.org/issue23585>
___
___
Python-bugs-list
Changes by Robert Collins :
--
stage: -> needs patch
type: -> crash
___
Python tracker
<http://bugs.python.org/issue23310>
___
___
Python-bugs-list
Changes by Robert Collins :
--
type: crash -> behavior
___
Python tracker
<http://bugs.python.org/issue23310>
___
___
Python-bugs-list mailing list
Unsubscrib
Robert Collins added the comment:
Fixed (patch referenced 22936)
--
resolution: -> fixed
status: open -> closed
___
Python tracker
<http://bugs.python.org/i
Robert Collins added the comment:
Regression fixed AFAICT, please re-open if not.
--
resolution: -> fixed
status: open -> closed
___
Python tracker
<http://bugs.python.org/i
New submission from Robert Collins:
I was timing some cold-cache operations today and had to not use timeit because
I wanted to run some code between statement (flushing caches) that shouldn't be
timed as part of statement. It would be nice, similarly to -s, to be able to
say -i '
Robert Collins added the comment:
That should be straightforward - its just sequence suffix/prefix overlap
detection, and FrameSummary (unlike frames) can be compared with ==. So yes, I
think it makes it easier. It's not on my immediate itch-scratching though, but
if someone were to po
Robert Collins added the comment:
Closing, though ideally Terry can confirm it is fully fixed for him.
--
resolution: -> fixed
status: open -> closed
___
Python tracker
<http://bugs.python.org/i
Changes by Robert Collins :
--
nosy: +rbcollins
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<http://bugs.python.or
401 - 500 of 542 matches
Mail list logo