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

Support colocated unit tests #78

Open
jayvdb opened this issue Mar 11, 2019 · 2 comments
Open

Support colocated unit tests #78

jayvdb opened this issue Mar 11, 2019 · 2 comments

Comments

@jayvdb
Copy link
Member

jayvdb commented Mar 11, 2019

See ryanhiebert/backports.csv#33 (comment)

As I understand it, @ryanhiebert wants foo/config.py to be tested by foo/test_config.py , and the tests to be included in the sdist, but not be included in the wheel.

I suspect this is probably possible to be done using stock setuptools with a custom py_modules that includes every module, and a MANIFEST.in which finds all of the tests.

@ryanhiebert
Copy link

That's the basic idea, although I name the test file more like foo/config_test.py to allow the two files to be next to each other in my file browser. If there were a good way to have the unittests in the same file, the way rust does, I'd also be interested in that. The closer to the code it's testing, the better, basically.

@chfw
Copy link
Member

chfw commented Mar 11, 2019

I am on react side too. It does allow me to find test quicker.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants