question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unittesting not working: "Test framework undefined is not installed. Install?"

See original GitHub issue

Environment data

  • VS Code version: 1.30.2 (user setup)
  • Extension version (available under the Extensions sidebar): Python 2018.12.1
  • OS and version: Windows_NT x64 10.0.17134
  • Python version (& distribution if applicable, e.g. Anaconda): Python 3.6 through Anaconda
  • Type of virtual environment used (N/A | venv | virtualenv | conda | …): conda, venv…
  • Relevant/affected Python packages and their versions: None

Expected behaviour

I try to run unit tests using the standard unittest framework following the steps outlined in this tutorial.

Actual behaviour

However, when discovering the unittests, I get this error message: “Test framework undefined is not installed. Install?”.

Steps to reproduce:

Same as in the tutorial.

Logs

Output for Python in the Output panel (ViewOutput, change the drop-down the upper-right of the Output panel to Python)

Starting Jedi Python language engine.
##########Linting Output - flake8##########
##########Linting Output - pylint##########

--------------------------------------------------------------------

Your code has been rated at 10.00/10 (previous run: 10.00/10, +0.00)



##########Linting Output - flake8##########
##########Linting Output - pylint##########

--------------------------------------------------------------------

Your code has been rated at 10.00/10 (previous run: 10.00/10, +0.00)

Output from Console under the Developer Tools panel (toggle Developer Tools on under Help; turn on source maps to make any tracebacks be useful by running Enable source map support for extension debugging)

[Extension Host] Python Extension: displayDiscoverStatus TypeError: Cannot read property 'uri' of undefined
	at module.exports.t.BaseTestManager.discoverTests.r.serviceContainer.get.discoverTests.then.catch.e (C:\Users\jmg\.vscode\extensions\ms-python.python-2018.12.1\out\client\extension.js:1:269713)
	at <anonymous>
	at process._tickCallback (internal/process/next_tick.js:188:7)
t.log @ console.ts:134
notificationsAlerts.ts:40 Test framework undefined is not installed. Install?
t.onDidNotificationChange @ notificationsAlerts.ts:40
notificationsAlerts.ts:40 Test discovery error, please check the configuration settings for the tests.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:18

github_iconTop GitHub Comments

2reactions
Siko91commented, Feb 22, 2019

I have the same problem. I am using a very similar settings.json

1reaction
DonJayamannecommented, Feb 4, 2019

Have yo opened a folder in VS Code? Please could you send a screenshot of VSCode.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Where to find "Microsoft.VisualStudio.TestTools.UnitTesting ...
It can be found at C:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE\PublicAssemblies\ directory (for VS2010 professional or above; .NET Framework ...
Read more >
Sinon.JS - Standalone test fakes, spies, stubs and mocks for ...
Standalone test spies, stubs and mocks for JavaScript. Works with any unit testing framework.
Read more >
Testing constructs - AWS Cloud Development Kit (AWS CDK) v2
The standard approach to testing AWS CDK apps uses the AWS CDK's assertions module and popular test frameworks like Jest for TypeScript and...
Read more >
Django Tutorial Part 10: Testing a Django web application
Not only is there more to test, but, as interactions between components ... unit testing of your website using Django's test framework.
Read more >
Unit Testing of Pulumi Programs
When running an update, your Pulumi program talks to the Pulumi CLI to orchestrate the deployment. The idea of unit tests is to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found