0

我的配置文件看起来像这样

# function class,dir, file match this regular expression are considered tests
[NOSE_TESTMATCH]
#by default this is-  (?:^|[\b_\./-])[Tt]est

# The file names after this block are ignored while testing
[NOSE_IGNORE_FILES]
test_case_1.py
# the regex that match the specified regex(if any) are excluded from tests
[NOSE_EXCLUDE]
#eg: test_s*

# the regex that match the specified regex(if any) are included from tests
[NOSE_INCLUDE]

#eg: test_s*

当我使用 -c 选项运行鼻子测试时,我得到了这个输出

[kiran@my_redhat test]$ nosetests -w cases/ -s -c examples/nose_test.config
Usage: nosetests [options]

**nosetests: error: Error reading config file 'examples/nose_test.config': File contains parsing errors: examples/nose_test.config
        [line  7]: 'test_case_1.py\n'**
4

2 回答 2

0

解决方案真的很简单。

基本上文档不好。

它只是一个鼻子测试块和后续行中的其他选项。例如

[鼻子测试]

忽略文件=abc.py

谢谢

于 2013-08-05T16:36:17.193 回答
0
>[nosetests]
>ignore-files=<path of files>
>exclude=<path of files>
>include=<path of files>

有助于

于 2016-08-11T10:34:42.010 回答