Skip to content

unittest "unhandled exception in thread" after running tests #78

Closed
@DonJayamanne

Description

@DonJayamanne

From @dosentmatter on January 26, 2017 19:30

Environment data

VS Code version: 1.8.1
Python Extension version: 0.5.6
Python Version: 3.5.2 and 3.6.0
OS and version: macOS Sierra Version 10.12.3

Actual behavior

I am using the standard unit testing framework, unittest. After running my tests, whether they pass or not and whether I run a single test or multiple tests, I get "Unhandled exception in thread started by" after the OK or FAILED. There is nothing after the "by" it is started "by". It does not seem like a big problem though since tests are still run.

Expected behavior

I should not get the "Unhandled exception in thread started by" message.

Steps to reproduce:

  • Create a project folder
  • Create a file called test_unit.py and put this in it:
import unittest

class TestUnit(unittest.TestCase):

    def test_unit(self):
        pass
  • run all or the single unittest with the settings.json below.
  • Test passes with OK but you get "Unhandled exception in thread started by".

Settings

Your launch.json (if dealing with debugger issues):
none
Your settings.json:

// Place your settings in this file to overwrite default and user settings.
{
    "python.unitTest.unittestEnabled": true,

    "python.unitTest.unittestArgs": [
        "-v",
        "-p",
        "test_unit*.py"
    ]
}

Logs

Output from Python output panel

test_unit (test_unit.TestUnit) ... ok

----------------------------------------------------------------------
Ran 1 test in 0.001s

OK
Unhandled exception in thread started by 

Output from Console window (Help->Developer Tools menu)
none

Copied from original issue: DonJayamanne/pythonVSCode#674

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions