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

Add option to generate test suites #252

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

kanstantsin
Copy link

#251

If generatetestsuites option is on, test suites are generated based on test file names.
If generatetestsuites option is on and there is started test in pytest_runtest_logstart - report build problem.

Another flag unmodifiedverbosity is added to stop plugin from modifying verbosity level which is regulated by pytest user. Currently teamcity-messages plugin produces unexpected side effect by modifying verbosity level. E.g. calling pytest --quiet is not quiet due to teamcty reporting. Can move that to a separate PR.


config.option.verbose = 2 # don't truncate assert explanations
if not unmodified_verbosity:
config.option.verbose = 2 # don't truncate assert explanations
Copy link
Author

Choose a reason for hiding this comment

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

I had to spend some time trying to understand why my verbosity control didn't work via command line arguments passed to pytest. I think, it's generally a bad idea to modify config object which is intended to retrieve data from it. To not break the API I decided to add parameter to turn this off. Can create a separate issue for that if it would be more convenient.

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.

1 participant