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

SystemExit running units tests #4347

Closed
david-waterworth opened this issue Feb 11, 2019 · 1 comment
Closed

SystemExit running units tests #4347

david-waterworth opened this issue Feb 11, 2019 · 1 comment

Comments

@david-waterworth
Copy link

I'm getting the same exception as #1529

Running on Ubuntu 18.04 python 3.7.2

I can reproduce with the trivial example below. This file resides in a subfolder in my project.

import unittest

class Test(unittest.TestCase):
    def test_(self):
        self.assertTrue(True)

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

launch.json is

    {
        "name": "Python: Current File (Integrated Terminal)",
        "type": "python",
        "request": "launch",
        "program": "${file}",
        "console": "integratedTerminal"
    },

I've also been unable to get 'Discover Unit Tests' to work, not sure if that's related. But I can run from the command line

python -m unittest tests

Works fine (I did have to add init.py and explicitly import tests from each file in .\tests by I guess that's normal)

@ghost ghost added the triage-needed Needs assignment to the proper sub-team label Feb 11, 2019
@d3r3kk
Copy link

d3r3kk commented Feb 11, 2019

Duplicate of #3201

@d3r3kk d3r3kk marked this as a duplicate of #3201 Feb 11, 2019
@d3r3kk d3r3kk closed this as completed Feb 11, 2019
@ghost ghost removed the triage-needed Needs assignment to the proper sub-team label Feb 11, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Mar 11, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants