Source-Code encoding can only be specified once

Issue #453 resolved
Anonymous created an issue

Hi

I found that coveralls can't process files which have both the emacs and vim style fileencoding specifiers are given at the top of a file.

# -*-  coding:utf-8 -*-
# vim: fileencoding=utf-8

I created a gist that reproduces the problem. You can run it with

nosetests test_example.py --with-coverage --cover-package=exampl

This will result in an error like this.

example.py   NotPython: Couldn't parse '/home/max/Desktop/coverage-test/example.py' as Python source: 'encoding declaration in Unicode string' at line 0

According to PEP 0263 both are OK but it doesn't say anything about giving both forms.

Comments (3)

  1. Log in to comment