How do I run a single test with Nose in Pylons

后端 未结 6 1326
星月不相逢
星月不相逢 2021-01-29 23:09

I have a Pylons 1.0 app with a bunch of tests in the test/functional directory. I\'m getting weird test results and I want to just run a single test. The nose documentation say

6条回答
  •  借酒劲吻你
    2021-01-29 23:36

    I have to add the ".py" file extension, that is,

    r'/path_to/my_file.py:' +  r'test_func_xy'
    

    Maybe this is because I don't have any classes in the file. Without the .py, nose was complaining:

    Can't find callable test_func_xy in file /path_to/my_file: file is not a python module

    And this although I have an __init__.py in the folder /path_to/.

提交回复
热议问题