python coverage fails with ‘invalid syntax’ – solution
July 22, 2009 – 21:43If you get
class 'coverage.CoverageException'>: Couldn't parse '<filename>'
as Python source: 'invalid syntax' at line 1
just make sure that your file has correct line endings. I’ve spent some time guessing until converted dos line ends to unix ones.