Converting tests to unittest/doctest?
Hi all, a bit of grep'ping and personal examination discovered the following tests in trunk/ that could be converted to unittest or doctests. Any thoughts, pro or con? (I understand from Brett that the goal is to eradicate "old-style" tests, by which I think he means tests that do not use unittest or doctest. There are some good reasons to switch to using unittests, not least of which is that you can use a variety of frameworks (nose, py.test) to do value-added wrapping and management of such tests.) Suggestions for additional things to test or tests to modify, clean up, or extend and expand are welcome. thanks, --titus --- test_select test_contains test_crypt test_dbm test_dummy_threading test_errno test_getargs test_gdbm test_pep247 test_strftime test_thread test_queue test_fcntl test_format test_curses test_descr test_funcattrs test_gdbm test_socketserver
(oops, realized I didn't send it to the list, just to Titus) I remember that it was one of the tasks at the Python Sprint at Google last summer, so I guess this is a good idea (for GHOP, right ?)
From what remains of the spreadsheet used during the Sprint (http://spreadsheets.google.com/ccc?key=pBLWM8elhFAmKbrhhh0ApQA&pli=1), I believe you can add the following tests to your list:
test_tokenize
test_cProfile
test_extcall
test_logging
test_profile
test_thread
(and maybe test_pep277 that seems to use both unittest and test.test_support
)
HTH,
Quentin
On Dec 21, 2007 12:05 PM, Titus Brown
Hi all,
a bit of grep'ping and personal examination discovered the following tests in trunk/ that could be converted to unittest or doctests. Any thoughts, pro or con?
(I understand from Brett that the goal is to eradicate "old-style" tests, by which I think he means tests that do not use unittest or doctest. There are some good reasons to switch to using unittests, not least of which is that you can use a variety of frameworks (nose, py.test) to do value-added wrapping and management of such tests.)
Suggestions for additional things to test or tests to modify, clean up, or extend and expand are welcome.
thanks, --titus
---
test_select test_contains test_crypt test_dbm test_dummy_threading test_errno test_getargs test_gdbm test_pep247 test_strftime
test_thread
test_queue
test_fcntl
test_format
test_curses
test_descr
test_funcattrs
test_gdbm
test_socketserver _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/qgallet%40gmail.com
On Fri, Dec 21, 2007 at 04:02:21PM +0100, Quentin Gallet-Gilles wrote: -> (oops, realized I didn't send it to the list, just to Titus) -> -> I remember that it was one of the tasks at the Python Sprint at Google last -> summer, so I guess this is a good idea (for GHOP, right ?) Yep! -> >From what remains of the spreadsheet used during the Sprint -> (http://spreadsheets.google.com/ccc?key=pBLWM8elhFAmKbrhhh0ApQA&pli=1), -> I believe you can add the following tests to your list: -> -> test_tokenize -> test_cProfile -> test_extcall -> test_logging -> test_profile -> test_thread -> (and maybe test_pep277 that seems to use both unittest and test.test_support -> ) These were already done as part of GHOP, just not all checked in yet -- we're waiting for some contributor agreements. But thanks, that's exactly the sort of info I'm looking for! cheers, --titus
Hi Titus. Great work on GHOP!
On Dec 21, 2007 3:05 AM, Titus Brown
Hi all,
a bit of grep'ping and personal examination discovered the following tests in trunk/ that could be converted to unittest or doctests. Any thoughts, pro or con?
Yes, it would be great to get rid of the old style tests. I didn't verify your list, but it looked good. The most important ones to get rid of are the ones that compare output. It would also be great to fix the flaky tests. Nearly all are related to networking. I think Raymond started a thread about some of these issues. (Hopefully I'll catch up on some mail over the holidays.) The flaky tests are probably too large for GHOP, but feel free to try fix them. From memory the flakiest ones are: test_xmlrpc, test_urllib2, test_urllib2net n
participants (3)
-
Neal Norwitz
-
Quentin Gallet-Gilles
-
Titus Brown