提交 180fdaa4 authored 作者: Simon Lefrancois's avatar Simon Lefrancois

fix flake8 whitelist on windows

上级 d66cefe7
...@@ -4,6 +4,7 @@ Test flake8 errors. ...@@ -4,6 +4,7 @@ Test flake8 errors.
from __future__ import absolute_import, print_function, division from __future__ import absolute_import, print_function, division
from nose.plugins.skip import SkipTest from nose.plugins.skip import SkipTest
import os import os
import sys
from fnmatch import fnmatch from fnmatch import fnmatch
import theano import theano
try: try:
...@@ -129,6 +130,8 @@ def test_format_flake8(): ...@@ -129,6 +130,8 @@ def test_format_flake8():
total_errors = 0 total_errors = 0
for path in list_files(): for path in list_files():
rel_path = os.path.relpath(path, theano.__path__[0]) rel_path = os.path.relpath(path, theano.__path__[0])
if sys.platform == 'win32':
rel_path = rel_path.replace('\\', '/')
if rel_path in whitelist_flake8: if rel_path in whitelist_flake8:
continue continue
else: else:
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论