test pep8
This commit is contained in:
parent
046eeda0d8
commit
da02f8eeb1
@ -1,6 +1,7 @@
|
|||||||
language: cpp
|
language: cpp
|
||||||
install:
|
install:
|
||||||
- sudo apt-get install g++ cmake gfortran
|
- sudo apt-get install g++ cmake gfortran
|
||||||
- sudo pip install pytest
|
- sudo pip install pytest pep8
|
||||||
script:
|
script:
|
||||||
|
- pep8 --ignore=E501 update.py
|
||||||
- py.test -vv test/test.py
|
- py.test -vv test/test.py
|
||||||
|
@ -9,17 +9,16 @@ from collections import OrderedDict
|
|||||||
# for compatibility with Python < 2.7
|
# for compatibility with Python < 2.7
|
||||||
if sys.version_info[0] > 2:
|
if sys.version_info[0] > 2:
|
||||||
from configparser import RawConfigParser
|
from configparser import RawConfigParser
|
||||||
else:
|
|
||||||
from ConfigParser import RawConfigParser
|
|
||||||
|
|
||||||
if sys.version_info[0] > 2:
|
|
||||||
import urllib.request
|
import urllib.request
|
||||||
|
|
||||||
class URLopener(urllib.request.FancyURLopener):
|
class URLopener(urllib.request.FancyURLopener):
|
||||||
def http_error_default(self, url, fp, errcode, errmsg, headers):
|
def http_error_default(self, url, fp, errcode, errmsg, headers):
|
||||||
sys.stderr.write("ERROR: could not fetch %s\n" % url)
|
sys.stderr.write("ERROR: could not fetch %s\n" % url)
|
||||||
sys.exit(-1)
|
sys.exit(-1)
|
||||||
else:
|
else:
|
||||||
|
from ConfigParser import RawConfigParser
|
||||||
import urllib
|
import urllib
|
||||||
|
|
||||||
class URLopener(urllib.FancyURLopener):
|
class URLopener(urllib.FancyURLopener):
|
||||||
def http_error_default(self, url, fp, errcode, errmsg, headers):
|
def http_error_default(self, url, fp, errcode, errmsg, headers):
|
||||||
sys.stderr.write("ERROR: could not fetch %s\n" % url)
|
sys.stderr.write("ERROR: could not fetch %s\n" % url)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user