From 169d8d1e54d4350469a1dab3cfabb581f7d8ddf3 Mon Sep 17 00:00:00 2001 From: holger krekel Date: Wed, 12 May 2010 14:12:07 +0200 Subject: [PATCH] fix test to account for jython python file ending --HG-- branch : trunk --- testing/code/test_source.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/testing/code/test_source.py b/testing/code/test_source.py index d94401161..30fe3b048 100644 --- a/testing/code/test_source.py +++ b/testing/code/test_source.py @@ -375,8 +375,7 @@ def test_getfslineno(): fspath, lineno = getfslineno(f) fname = __file__ - if fname.lower().endswith('.pyc'): - fname = fname[:-1] + fname = fname[:fname.find('.py')] + '.py' assert fspath == py.path.local(fname) assert lineno == py.code.getrawcode(f).co_firstlineno-1 # see findsource