Skip to content

Even though the wildcard matches, tests aren't discovered #18361

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

Closed
TylerLeonhardt-alt opened this issue Jan 25, 2022 · 1 comment
Closed

Even though the wildcard matches, tests aren't discovered #18361

TylerLeonhardt-alt opened this issue Jan 25, 2022 · 1 comment
Assignees
Labels
area-testing bug Issue identified by VS Code Team member as probable bug

Comments

@TylerLeonhardt-alt
Copy link

Testing #18349

The following code:

import unittest


class TestSum2(unittest.TestCase):

    def test_sum2(self):
        self.assertEqual(sum([1, 2, 3]), 6, "Should be 6")

    def test_sum2_tuple(self):
        self.assertEqual(sum((1, 2, 2)), 6, "Should be 6")

if __name__ == '__main__':
    unittest.main()

in a file called some.test.py with the following configuration:

{
    "python.testing.unittestArgs": [
        "-v",
        "-s",
        ".",
        "-p",
        "*test.py"
    ],
    "python.testing.pytestEnabled": false,
    "python.testing.unittestEnabled": true,
    "python.linting.enabled": true,
    "python.linting.pylintEnabled": true
}

doesn't discover the tests. If I rename the file to sometest.py (note the removal of the .) then the tests are discovered.

Ubuntu 20.04

cc @TylerLeonhardt

@github-actions github-actions bot added the triage-needed Needs assignment to the proper sub-team label Jan 25, 2022
@karthiknadig karthiknadig added area-testing bug Issue identified by VS Code Team member as probable bug triage and removed triage-needed Needs assignment to the proper sub-team labels Jan 26, 2022
@paulacamargo25
Copy link

This is the expected behavior, it is not a conda run execution problem.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 28, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-testing bug Issue identified by VS Code Team member as probable bug
Projects
None yet
Development

No branches or pull requests

3 participants