-
Notifications
You must be signed in to change notification settings - Fork 105
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
TypeError: don't know how to make test from: None #37
Comments
That's very strange! Does the test run as expected without the |
Test works perfectly fine without @parametrized. |
Okay, could you try:
And see if it works or if it crashes. When I run this test with Python 3.5 + unittest it seems to work, so I'd like to see if it's something strange with the Visual Studio test runner, or with my testing setup. |
Ok, so my code looks like this:
When I select this file and run directly from VS it seems to be working fine:
However now I get a different error with built-in test runner in VS:
Thanks for responding at this late hour ; ) |
Hmm okay, so it's definitely an issue with the VS launcher then… and unfortunately, without access to VS, I'm not sure how to debug that. Do you have a friend or colleague who may be able to help with the debugging? |
I'm afraid I don't. |
I'm having the same issue. Only happens if I run a specific test, if test them all it works. Using flask, python 3.5 |
Ah! Okay, in coming back I think I know what the issue is: it looks like VisualStudio is trying to run a test named Unfortunately I can't think of any great way to handle this. A couple of less-great-but-would-work ways, though:
Please let me know if you come up with something! |
I ran into this running tests in pycharm recently, the fix was to run unit tests on the whole file rather than the just the parameterized test case. |
Just had this problem (MS VS et unittest - only test runner supported), and I was thinking about this potential solution :
How about making
I am making the assumption that people using unittest as a test runner might want a minimum of dependencies and very simple/known/unittest like behavior. |
What is happening is that when you run all of the tests, the parameterized.expand decorator is creating individual test cases for each of the items in the expand array. The individual testcase is named You can run the individual test case now that you have the specific name of the test case. Append the If this doesn't make sense, you can prove this out by adding something that will purposefully fail the test |
raise TypeError("don't know how to make test from: %s" % obj) i found the issue, the cursor leave the function, ight click the blank space and run the function is pass 光标或者鼠标不要这个参数化函数上,然后右击点运行,就可以啦~ |
add subtest for unittest fix issue wolever#98 wolever#37
I cannot run sample test using Visual Studio 2015, Python 3.5 and unittest2:
The text was updated successfully, but these errors were encountered: