[Patches] [ python-Patches-440827 ] Tests for dircache.py

noreply@sourceforge.net noreply@sourceforge.net
Thu, 19 Jul 2001 16:02:28 -0700


Patches item #440827, was opened at 2001-07-12 13:54
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=305470&aid=440827&group_id=5470

Category: library
Group: None
>Status: Closed
>Resolution: Accepted
Priority: 5
Submitted By: Nick Mathewson (nickm)
Assigned to: Fred L. Drake, Jr. (fdrake)
Summary: Tests for dircache.py

Initial Comment:
Another installment: unit tests for dircache.py.

I'm not sure whether the functionality of
dircache.annotate is as intended; it appends '/'
instead of os.sep blindly, regardless of platform.  I
don't know whether this is a bug or a feature, so I'm
just assuming that the current behavior is correct.

----------------------------------------------------------------------

>Comment By: Fred L. Drake, Jr. (fdrake)
Date: 2001-07-19 16:02

Message:
Logged In: YES 
user_id=3066

Accepted with modifications:

  - Don't alias the functions being tested; write out
    their names so the tests are easier to understand.
    I.e., "dircache.listdir" instead of "ld".

  - Don't use a try/except or try/finally if not needed,
    and minimize the code in the try clause.

  - Don't tear down the test in the test_*() method,
    let the tearDown() method you already wrote do the
    work.

Thanks!

----------------------------------------------------------------------

You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=305470&aid=440827&group_id=5470