Commits

holger krekel  committed ecdfda3

two fixes for Jython

  • Participants
  • Parent commits 1285692

Comments (0)

Files changed (2)

File py/_code/code.py

         return self.exprinfo
 
     def getfirstlinesource(self):
-        return self.frame.code.firstlineno
+        # on Jython this firstlineno can be -1 apparently
+        return max(self.frame.code.firstlineno, 0)
 
     def getsource(self):
         """ return failing source code. """

File testing/plugin/test_pytest_terminal.py

             "*hello: info*",
         ])
 
-needsosdup = py.test.mark.xfail("not hasattr(os, 'dup')")
+@py.test.mark.xfail("not hasattr(os, 'dup')")
 def test_fdopen_kept_alive_issue124(testdir):
     testdir.makepyfile("""
         import os, sys