only use the last part of the module name in the filename (fixes #68)

This commit is contained in:
Benjamin Peterson
2011-08-30 00:12:07 -04:00
parent abe080c6b4
commit 661a8a4a92
3 changed files with 11 additions and 1 deletions

View File

@@ -77,7 +77,7 @@ class AssertionRewritingHook(object):
# Don't know what this is.
return None
else:
fn = os.path.join(pth, name + ".py")
fn = os.path.join(pth, name.rpartition(".")[2] + ".py")
fn_pypath = py.path.local(fn)
# Is this a test file?
if not sess.isinitpath(fn):