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

Template fix: missing entry point if "argparse" and config for "nosetests" #64

Merged
merged 2 commits into from
Jul 27, 2016

Conversation

tantale
Copy link

@tantale tantale commented May 27, 2016

I change the setup.py to generate the console script entry point in "argparse" is chosen (not only "plain" or "click").

I add a section for nosetests in setup.cfg if "nose" if chosen and remove the pytest section.

I fix the nosetests command in tox.ini: "tests" is removed because it is interpreted as being a package instead of a directory.

tantale added 2 commits May 27, 2016 14:31
… 'no' and not only for 'plain' or 'click' ('argparse' was missing).
…``tox.ini``. ``pytest`` is removed from ``setup.cfg`` if ``nose`` is chosen.
@@ -65,10 +65,10 @@ commands =
{%- endif %}
{%- else %}
{%- if cookiecutter.test_matrix_separate_coverage|lower == 'yes' %}
nocov: {posargs:nosetests -v tests}
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs not be removed: it would collect the code in the src dir while normally it's imported from site-packages. That would lead to many subtle issues(like doubly executed module, reference issues, collection errors etc).

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmmm... on second thought, does the [nosetests]where in setup.cfg always apply?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I fact nosetes read the setup.cfg if it is started in the project's directory.
See: http://nose.readthedocs.io/en/latest/usage.html#configuration
Is the current working directory set during tox task?

Copy link
Owner

@ionelmc ionelmc May 27, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CWD isn't changed. It's fine, however, if the location is fixed in the config file then the cover envs have no chance of collecting doctests. This is why it was specified on command line. Less than ideal but test_matrix_separate_coverage is not for everyone either :)

@ionelmc
Copy link
Owner

ionelmc commented May 27, 2016

Good catch about that missing entrypoint. I wonder if the default tests should be integration tests (the missing entrypoint would had been caught early) ...

@ionelmc ionelmc merged commit 6512a39 into ionelmc:master Jul 27, 2016
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

Successfully merging this pull request may close these issues.

2 participants