Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pytensor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
testgroup
pytensor
Commits
9eced720
提交
9eced720
authored
5月 22, 2015
作者:
Arnaud Bergeron
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Flake8 for main.py
上级
006f1de2
显示空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
12 行增加
和
15 行删除
+12
-15
main.py
theano/tests/main.py
+12
-14
test_flake8.py
theano/tests/test_flake8.py
+0
-1
没有找到文件。
theano/tests/main.py
浏览文件 @
9eced720
from
__future__
import
print_function
from
__future__
import
print_function
import
os
,
unittest
,
sys
import
os
import
nose.plugins.builtin
import
unittest
import
sys
from
nose.config
import
Config
from
nose.config
import
Config
from
nose.plugins.manager
import
PluginManager
from
nose.plugins.manager
import
PluginManager
from
numpy.testing.nosetester
import
import_nose
,
NoseTester
import
nose.plugins.builtin
from
numpy.testing.nosetester
import
NoseTester
from
numpy.testing.noseclasses
import
KnownFailure
,
NumpyTestProgram
from
numpy.testing.noseclasses
import
KnownFailure
,
NumpyTestProgram
...
@@ -31,7 +34,7 @@ class TheanoNoseTester(NoseTester):
...
@@ -31,7 +34,7 @@ class TheanoNoseTester(NoseTester):
:type extra_argv: list
:type extra_argv: list
:param extra_argv: List with any extra arguments to pass to nosetests.
:param extra_argv: List with any extra arguments to pass to nosetests.
"""
"""
#self.package_path = os.path.abspath(self.package_path)
#
self.package_path = os.path.abspath(self.package_path)
argv
=
[
__file__
,
self
.
package_path
]
argv
=
[
__file__
,
self
.
package_path
]
argv
+=
[
'--verbosity'
,
str
(
verbose
)]
argv
+=
[
'--verbosity'
,
str
(
verbose
)]
if
extra_argv
:
if
extra_argv
:
...
@@ -39,8 +42,6 @@ class TheanoNoseTester(NoseTester):
...
@@ -39,8 +42,6 @@ class TheanoNoseTester(NoseTester):
return
argv
return
argv
def
_show_system_info
(
self
):
def
_show_system_info
(
self
):
nose
=
import_nose
()
import
theano
import
theano
print
(
"Theano version
%
s"
%
theano
.
__version__
)
print
(
"Theano version
%
s"
%
theano
.
__version__
)
theano_dir
=
os
.
path
.
dirname
(
theano
.
__file__
)
theano_dir
=
os
.
path
.
dirname
(
theano
.
__file__
)
...
@@ -55,16 +56,14 @@ class TheanoNoseTester(NoseTester):
...
@@ -55,16 +56,14 @@ class TheanoNoseTester(NoseTester):
Takes the same arguments as `test`.
Takes the same arguments as `test`.
"""
"""
# fail with nice error message if nose is not present
nose
=
import_nose
()
# compile argv
# compile argv
argv
=
self
.
_test_argv
(
verbose
,
extra_argv
)
argv
=
self
.
_test_argv
(
verbose
,
extra_argv
)
# numpy way of doing coverage
# numpy way of doing coverage
if
coverage
:
if
coverage
:
argv
+=
[
'--cover-package=
%
s'
%
self
.
package_name
,
'--with-coverage'
,
argv
+=
[
'--cover-package=
%
s'
%
self
.
package_name
,
'--cover-tests'
,
'--cover-inclusive'
,
'--cover-erase'
]
'--with-coverage'
,
'--cover-tests'
,
'--cover-inclusive'
,
'--cover-erase'
]
# Capture output only if needed
# Capture output only if needed
if
not
capture
:
if
not
capture
:
...
@@ -91,7 +90,8 @@ class TheanoNoseTester(NoseTester):
...
@@ -91,7 +90,8 @@ class TheanoNoseTester(NoseTester):
:param extra_argv: List with any extra arguments to pass to nosetests.
:param extra_argv: List with any extra arguments to pass to nosetests.
:type coverage: bool
:type coverage: bool
:param coverage: If True, report coverage of Theano code. Default is False.
:param coverage: If True, report coverage of Theano
code. Default is False.
:type capture: bool
:type capture: bool
:param capture: If True, capture the standard output of the tests, like
:param capture: If True, capture the standard output of the tests, like
...
@@ -134,8 +134,6 @@ class TheanoNoseTester(NoseTester):
...
@@ -134,8 +134,6 @@ class TheanoNoseTester(NoseTester):
def
main
(
modulename
):
def
main
(
modulename
):
debug
=
False
if
0
:
if
0
:
unittest
.
main
()
unittest
.
main
()
elif
len
(
sys
.
argv
)
==
2
and
sys
.
argv
[
1
]
==
"--debug"
:
elif
len
(
sys
.
argv
)
==
2
and
sys
.
argv
[
1
]
==
"--debug"
:
...
...
theano/tests/test_flake8.py
浏览文件 @
9eced720
...
@@ -31,7 +31,6 @@ whitelist_flake8 = [
...
@@ -31,7 +31,6 @@ whitelist_flake8 = [
"tests/test_record.py"
,
"tests/test_record.py"
,
"tests/__init__.py"
,
"tests/__init__.py"
,
"tests/test_updates.py"
,
"tests/test_updates.py"
,
"tests/main.py"
,
"tests/test_pickle_unpickle_theano_fn.py"
,
"tests/test_pickle_unpickle_theano_fn.py"
,
"tests/test_determinism.py"
,
"tests/test_determinism.py"
,
"tests/record.py"
,
"tests/record.py"
,
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论