Skip to content

Correct cmdclass for doc: Good Integration Practices#3871

Merged
nicoddemus merged 2 commits intopytest-dev:masterfrom
schmamps:cmdclass
Aug 25, 2018
Merged

Correct cmdclass for doc: Good Integration Practices#3871
nicoddemus merged 2 commits intopytest-dev:masterfrom
schmamps:cmdclass

Conversation

@schmamps
Copy link
Contributor

Addressing #3870

If you follow the guide to this point, the correct key for cmdclass will be the canonical name 'pytest' rather than the alias 'test' created in setup.cfg.

# ...,
tests_require=["pytest"],
cmdclass={"test": PyTest},
cmdclass={"pytest": PyTest},
Copy link
Member

Choose a reason for hiding this comment

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

Isn't this string ("test"/"pytest") the name of the command executed in the next section?

python setup.py test

Copy link
Contributor Author

@schmamps schmamps Aug 24, 2018

Choose a reason for hiding this comment

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

Earlier in the document, 'test' is created as an alias to 'pytest':

[aliases]
test=pytest

The command doesn't work unless you remove this from setup.cfg or replace that alias with the canonical name in setup.py.

Copy link
Member

Choose a reason for hiding this comment

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

Ahh right, thanks for the clarification! 👍

@coveralls
Copy link

Coverage Status

Coverage increased (+0.05%) to 92.637% when pulling f694859 on schmamps:cmdclass into c829061 on pytest-dev:master.

@nicoddemus
Copy link
Member

nicoddemus commented Aug 24, 2018

Btw thanks for your first contribution! 🎉

@schmamps
Copy link
Contributor Author

Thanks for responding to a PR!

@nicoddemus nicoddemus merged commit 72a58bb into pytest-dev:master Aug 25, 2018
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.

3 participants