From f97e0825431819ac064bccef90118b686f868b2a Mon Sep 17 00:00:00 2001 From: holger krekel Date: Fri, 14 May 2010 15:25:24 +0200 Subject: [PATCH] fix test to work on jython and cpy --HG-- branch : trunk --- testing/code/test_source.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/testing/code/test_source.py b/testing/code/test_source.py index 30fe3b048..35f2e45d1 100644 --- a/testing/code/test_source.py +++ b/testing/code/test_source.py @@ -374,10 +374,7 @@ def test_getfslineno(): fspath, lineno = getfslineno(f) - fname = __file__ - fname = fname[:fname.find('.py')] + '.py' - - assert fspath == py.path.local(fname) + assert fspath.basename == "test_source.py" assert lineno == py.code.getrawcode(f).co_firstlineno-1 # see findsource class A(object): @@ -386,5 +383,5 @@ def test_getfslineno(): fspath, lineno = getfslineno(A) _, A_lineno = py.std.inspect.findsource(A) - assert fspath == py.path.local(fname) + assert fspath.basename == "test_source.py" assert lineno == A_lineno