This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Increase coverage in logging module
Type: resource usage Stage:
Components: Tests Versions: Python 3.3
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: vinay.sajip Nosy List: drakeol, eric.araujo, gennad, nessita, python-dev, r.david.murray, vinay.sajip, vstinner
Priority: normal Keywords: patch

Created on 2011-03-15 15:20 by nessita, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
pycon-issue11557.patch nessita, 2011-03-16 19:40 review
cleanup-test_logging.diff eric.araujo, 2011-06-04 14:51 review
Messages (18)
msg130983 - (view) Author: Natalia Bidart (nessita) * Date: 2011-03-15 15:20
Current coverage is:

Name                   Stmts   Miss  Cover
------------------------------------------
Lib/logging/__init__     739    162    78%
Lib/logging/config       571     98    83%
Lib/logging/handlers     601    325    46%
------------------------------------------
TOTAL                   1911    585    69%
msg131160 - (view) Author: Natalia Bidart (nessita) * Date: 2011-03-16 19:40
Attaching a patch that increases test coverage for logging/__init__.py by 12%. There are still a lot more to do, but this pacth is big enough.
msg132485 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2011-03-29 16:20
New changeset c7f7672b70a9 by Vinay Sajip in branch 'default':
Closes issue #11557: Added Natalia Bidart's patch to improve test coverage.
http://hg.python.org/cpython/rev/c7f7672b70a9
msg132486 - (view) Author: Vinay Sajip (vinay.sajip) * (Python committer) Date: 2011-03-29 16:23
Closing, thanks for the patch.
msg132491 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2011-03-29 17:45
This seems to be causing some issues on the buildbots:

http://www.python.org/dev/buildbot/all/builders/AMD64%20Snow%20Leopard%202%203.x/builds/137
msg132492 - (view) Author: Natalia Bidart (nessita) * Date: 2011-03-29 17:51
I'll work on a fix during next weekend (sooner if I have an open slot).
msg132628 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2011-03-31 01:22
New changeset 024967cdc2f0 by Victor Stinner in branch 'default':
Issue #11557: disable test_logging.test_no_kwargs (fail on most buildbots)
http://hg.python.org/cpython/rev/024967cdc2f0
msg132629 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2011-03-31 01:23
test_logging.test_no_kwargs fails on AMD64 Snow Leopard 2 3.x, x86 Ubuntu Shared 3.x, sparc solaris10 gcc 3.x, AMD64 Leopard 3.x, x86 XP-4 3.x, x86 Windows7 3.x, x86 Tiger 3.x, PPC Tiger 3.x, ... I disabled the test because it became difficult to see new regressions because of this issue.

I'm trying to figure out if my new faulthandler works on not on 3.x buildbots.

---

Re-running test 'test_logging' in verbose mode
test_flat (test.test_logging.BuiltinLevelsTest) ... ok
(...)

test_compute_rollover_H (test.test_logging.TimedRotatingFileHandlerTest) ... ok
test_compute_rollover_M (test.test_logging.TimedRotatingFileHandlerTest) ... ok
test_compute_rollover_MIDNIGHT (test.test_logging.TimedRotatingFileHandlerTest) ... ok
test_compute_rollover_S (test.test_logging.TimedRotatingFileHandlerTest) ... ok
test_compute_rollover_W0 (test.test_logging.TimedRotatingFileHandlerTest) ... Warning -- logging._handlerList was modified by test_logging
test test_logging failed -- Traceback (most recent call last):
  File "/Users/buildbot/buildarea/3.x.parc-snowleopard-1/build/Lib/test/test_logging.py", line 2427, in test_no_kwargs
    self.assertEqual(logging.root.level, logging.WARNING)
AssertionError: 20 != 30
msg134133 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2011-04-20 09:58
New changeset 41dc66528c4e by Vinay Sajip in branch 'default':
Attempt fix of #11557 by changing teardown logic.
http://hg.python.org/cpython/rev/41dc66528c4e
msg134134 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2011-04-20 10:20
This issue is not fixed: the test does still fail... sometimes. Recent example (AMD64 FreeBSD 8.2 3.x buildbot):
----------------------------------------------------------------------
(...)
[283/354] test_logging
Warning -- logging._handlerList was modified by test_logging
test test_logging failed -- Traceback (most recent call last):
  File "/usr/home/buildbot/buildarea/3.x.krah-freebsd/build/Lib/test/test_logging.py", line 2449, in test_no_kwargs
    self.assertEqual(logging.root.level, logging.WARNING)
AssertionError: 20 != 30
(...)
1 test failed:
    test_logging
(...)
Re-running test 'test_logging' in verbose mode
(...)
test_log (test.test_logging.BasicConfigTest) ... ok
test_no_kwargs (test.test_logging.BasicConfigTest) ... FAIL
test_stream (test.test_logging.BasicConfigTest) ... ok
(...)
test_compute_rollover_W0 (test.test_logging.TimedRotatingFileHandlerTest) ... Warning -- logging._handlerList was modified by test_logging
test test_logging failed -- Traceback (most recent call last):
  File "/usr/home/buildbot/buildarea/3.x.krah-freebsd/build/Lib/test/test_logging.py", line 2449, in test_no_kwargs
    self.assertEqual(logging.root.level, logging.WARNING)
AssertionError: 20 != 30

ok

FAIL: test_no_kwargs (test.test_logging.BasicConfigTest)

Traceback (most recent call last):
  File "/usr/home/buildbot/buildarea/3.x.krah-freebsd/build/Lib/test/test_logging.py", line 2449, in test_no_kwargs
    self.assertEqual(logging.root.level, logging.WARNING)
AssertionError: 20 != 30
----------------------------------------------------------------------
http://www.python.org/dev/buildbot/all/builders/AMD64%20FreeBSD%208.2%203.x/builds/98/steps/test/logs/stdio
msg134136 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2011-04-20 10:51
New changeset 31bb4788aa1c by Vinay Sajip in branch 'default':
Attempt fix of #11557 by changing setup/teardown logic.
http://hg.python.org/cpython/rev/31bb4788aa1c
msg134139 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2011-04-20 11:21
New changeset 0494afdc8615 by Vinay Sajip in branch 'default':
Attempt fix of #11557 by refining setup/teardown logic.
http://hg.python.org/cpython/rev/0494afdc8615
msg134140 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2011-04-20 11:50
New changeset d93e18e6a3e8 by Vinay Sajip in branch 'default':
Attempt fix of #11557 by refining test logic.
http://hg.python.org/cpython/rev/d93e18e6a3e8
msg134146 - (view) Author: Vinay Sajip (vinay.sajip) * (Python committer) Date: 2011-04-20 12:45
Hi Victor,

----- Original Message ----

> From: STINNER Victor <report@bugs.python.org>
> To: vinay_sajip@yahoo.co.uk
> Sent: Wed, 20 April, 2011 11:20:11
> Subject: [issue11557] Increase coverage in logging module
> 
> 
> STINNER Victor <victor.stinner@haypocalc.com>  added the comment:
> 
> This issue is not fixed: the test does still fail...  sometimes. Recent example 
>(AMD64 FreeBSD 8.2 3.x  buildbot):

Yes, I know it's not fixed yet - I'm still working on it. The annoying thing, it 
works for me locally, and just fails on some of the buildbots. So I have to make 
changes, check them in, and wait for the buildbots to pick them up ... if I 
don't get a solution in the time I have at the moment to work on this, I'll 
leave the test as skipped so that further failures are avoided, until I get time 
to look at this again. But I've got some time today, so I hope to make progress 
on this issue, as it looks as if Natalia couldn't find the time ...

Regards,

Vinay
msg134149 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2011-04-20 13:32
> > This issue is not fixed: the test does still fail...  sometimes. Recent example 
> >(AMD64 FreeBSD 8.2 3.x  buildbot):
> 
> Yes, I know it's not fixed yet - I'm still working on it. (...)

I realized just after writing my message that the last (commit) message
marking the issue as fixed was very recent.
msg134156 - (view) Author: Vinay Sajip (vinay.sajip) * (Python committer) Date: 2011-04-20 14:38
Marking as closed, since d93e18e6a3e8 now appears to pass on all 3.x buildbots.
msg137644 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2011-06-04 14:51
I saw this commit pass by and noticed a few instances of non-idiomatic unittest code, like unnecessary lambdas or overuse of assertEqual where other methods would give more useful messages in case of failure.  Here’s a patch to better it.
msg137687 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2011-06-05 08:32
New changeset 44139ece7a31 by Vinay Sajip in branch 'default':
Closes issue #11557: removal of non-idiomatic code in test_logging.
http://hg.python.org/cpython/rev/44139ece7a31
History
Date User Action Args
2022-04-11 14:57:14adminsetgithub: 55766
2011-06-05 08:33:22vinay.sajipsetstatus: open -> closed
2011-06-05 08:32:00python-devsetmessages: + msg137687
2011-06-04 14:51:59eric.araujosetassignee: trentm -> vinay.sajip

nosy: - trentm
2011-06-04 14:51:41eric.araujosetstatus: closed -> open
files: + cleanup-test_logging.diff

nosy: + trentm, eric.araujo
messages: + msg137644

assignee: vinay.sajip -> trentm
2011-04-20 14:38:51vinay.sajipsetstatus: open -> closed
resolution: fixed
messages: + msg134156
2011-04-20 13:32:27vstinnersetmessages: + msg134149
2011-04-20 12:45:35vinay.sajipsetmessages: + msg134146
2011-04-20 11:50:50python-devsetmessages: + msg134140
2011-04-20 11:21:00python-devsetmessages: + msg134139
2011-04-20 10:51:05python-devsetmessages: + msg134136
2011-04-20 10:20:09vstinnersetresolution: fixed -> (no value)
messages: + msg134134
2011-04-20 09:58:15python-devsetmessages: + msg134133
2011-03-31 01:23:32vstinnersetnosy: + vstinner
messages: + msg132629
2011-03-31 01:22:38python-devsetmessages: + msg132628
2011-03-29 17:51:13nessitasetmessages: + msg132492
2011-03-29 17:45:16r.david.murraysetstatus: closed -> open
nosy: + r.david.murray
messages: + msg132491

2011-03-29 16:23:17vinay.sajipsetstatus: open -> closed
resolution: fixed
messages: + msg132486
2011-03-29 16:20:51python-devsetnosy: + python-dev
messages: + msg132485
2011-03-17 09:48:06gennadsetnosy: + gennad
2011-03-16 23:22:34vinay.sajipsetnosy: + drakeol
2011-03-16 23:21:26vinay.sajipsetassignee: vinay.sajip
2011-03-16 19:40:30nessitasetfiles: + pycon-issue11557.patch

messages: + msg131160
keywords: + patch
2011-03-16 18:06:02r.david.murraysetnosy: + vinay.sajip
2011-03-15 15:20:54nessitacreate