Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to run selected tests? #76

Closed
evandrocoan opened this issue Jan 6, 2018 · 3 comments
Closed

How to run selected tests? #76

evandrocoan opened this issue Jan 6, 2018 · 3 comments
Labels

Comments

@evandrocoan
Copy link
Contributor

For example:

.
|__ tests/
    |___a_tests.py
    |___b_tests.py

a_tests.py

class Tests():
     def test_a_test():
          print("a")

     def test_b_test():
          print("b")

b_tests.py

class Tests():
     def test_c_test():
          print("a")

     def test_d_test():
          print("b")

Can I set a setting like:

{
    "tests_dir" : "package_manager",
    "pattern" : "*tests.py",
    "async": false,
    "deferred": true,
    "verbosity": 1,
    "capture_console": false,
    "reload_package_on_testing": true,
    "show_reload_progress": true,
    "output": null,
    "selected_test": 
    [
         "test_b_test",
         "test_c_test",
    ]
}

If selected_tests is empty or non existent, then all tests are run. Otherwise, only the listed tests are run.

@randy3k
Copy link
Member

randy3k commented Jan 6, 2018

There are no options to run only a specific testcase or specific test in a testcase, but here is a#n option to run only a selected file.

@evandrocoan
Copy link
Contributor Author

This option would be setting the "pattern" : "test*.py", to the path of the desired file?

@randy3k
Copy link
Member

randy3k commented Jan 6, 2018

Yap, you could use that option or the command UnitTesting: Test Current File.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants