[py-dev] .py files without trailing newlines

holger krekel hpk at trillke.net
Thu Dec 9 09:32:01 CET 2004


Hi Ian, 

[Ian Bicking Thu, Dec 09, 2004 at 02:24:34AM -0600]
> Just noticed that I get a syntax error if I load a Python file (with 
> extpy) that doesn't have a trailing newline.

can you modify in py/path/local/local.py in getpycode() about
in the middle: 

    s = self.read(mode='rU') + '\n'

and see if it helps?  Would be great if you can add a small
test and the above fix (if it helps) and check it in. 

cheers, 

    holger

P.S.: i also quick-fixed the rootdir-problem.  test configuration 
      indeed needs documentation and some refactoring ... 



More information about the Pytest-dev mailing list