0

我的配置文件看起來像這樣蟒蛇nosetest配置文件解析錯誤

# 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選項nosetests我得到這個輸出

[[email protected]_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'** 

回答

0

的解決方案是真是小巫見大巫。

基本文件不好。

它只是一個nosetests塊和其他選項在隨後的行。 如

[nosetests]

忽略,文件= abc.py

感謝

0
>[nosetests] 
>ignore-files=<path of files> 
>exclude=<path of files> 
>include=<path of files> 

將有助於

+0

更多細節在你的答案將是有益的 – dbmitch