-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Move pythoneval and cmdline to pytest #3870
Conversation
8aa7f43
to
d4a2ac6
Compare
'-m', 'mypy.test.testcmdline', *driver.arglist, | ||
coverage=True) | ||
driver.add_python_mod('unit-test %s' % mod, 'mypy.myunit', '-m', mod, | ||
*driver.arglist, coverage=True) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The diff is somewhat confusing - this part belongs to add_myunit()
both suites execute in the same pytest instance as any other.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This all looks fine to me. @ambv if you have something to say, say it soon or I'll just merge this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
Sadly there's a problem with this. When I run the tests as follows:
every test in that file fails. Apparently the
This makes sense as the current directory is set to the temporary directory where the test files are written, so the repo root is not on The pythoneval tests fail in the same way. |
(And yes, I spent 2 hours trying to debug unrelated code because I didn't realize |
Ouch. Sorry. I recall checking for that before opening this PR, and it did not fail on my machine :\ I use
|
That test indeed does not fail without |
I wonder if you have mypy installed? That version looks like it comes from the installed version. If you |
Yes they are! Or actually, they didn't fail - until I've commented out the patch :) |
But actually this means my patch is the wrong solution. We need to make sure the folder is the right one, and simply adding it to PYTHONPATH does not guarantee it, I assume. |
Use mypy.api.run()? (See other issue.) |
(EDITED)
Another item from #1673, following #3780, #3788, #3861 and #3866.
After this,
StubgenPythonSuite
is the only data-driven test left in myunit.As in previous PRs, I have checked that a test may fail by changing tests and running
I am somewhat less confident about this PR, since I am not entirely sure what special considerations are in play here (which aren't there for the proper unit tests).
@ambv @gvanrossum: The splitting of eval tests, introduced in PR #2635, is removed. IIUC this was the intention - please correct me if I'm wrong. (I did not time the difference).
Executing multiple pytest instances does not work well with appveyor.