Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

chore: remove pytest-console-scripts specific config#1714

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
nejch merged 1 commit intomainfromjlvillal/pytest_script_launch_mode
Nov 27, 2021

Conversation

JohnVillalovos
Copy link
Member

Remove the pytest-console-scripts specific config from the global
'[pytest]' config section.

Move it to a command line option for the functional tests which use
the Docker container.

Closes#1713

@JohnVillalovosJohnVillalovosforce-pushed thejlvillal/pytest_script_launch_mode branch from2a71da0 toa2f7996CompareNovember 25, 2021 21:08
Copy link
Member

@nejchnejch left a comment

Choose a reason for hiding this comment

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

Thanks@JohnVillalovos just a quick note :)

@JohnVillalovosJohnVillalovos marked this pull request as draftNovember 25, 2021 21:32
@JohnVillalovosJohnVillalovosforce-pushed thejlvillal/pytest_script_launch_mode branch 5 times, most recently from0546f66 to2ef0b5bCompareNovember 25, 2021 21:59
@JohnVillalovos
Copy link
MemberAuthor

@nejch Thanks for the info above. If you have any ideas why my change is failing it would be appreciated. I guess I could just drop using the decorator as it seems to work okay without it. But I think it is using "in-process" mode by default instead of "subprocess" mode. Not sure if that matters or not.

@JohnVillalovosJohnVillalovosforce-pushed thejlvillal/pytest_script_launch_mode branch 2 times, most recently fromb598568 to05ea611CompareNovember 25, 2021 23:30
@JohnVillalovosJohnVillalovos marked this pull request as ready for reviewNovember 25, 2021 23:38
@JohnVillalovos
Copy link
MemberAuthor

@nejch Thanks for the info above. If you have any ideas why my change is failing it would be appreciated. I guess I could just drop using the decorator as it seems to work okay without it. But I think it is using "in-process" mode by default instead of "subprocess" mode. Not sure if that matters or not.

@nejch I got it figured out. Ready for review. Thanks.

@nejch
Copy link
Member

@nejch Thanks for the info above. If you have any ideas why my change is failing it would be appreciated. I guess I could just drop using the decorator as it seems to work okay without it. But I think it is using "in-process" mode by default instead of "subprocess" mode. Not sure if that matters or not.

@nejch I got it figured out. Ready for review. Thanks.

Thanks@JohnVillalovos. I hope my comment wasn't too confusing. What you did intox.ini would also work, I just wanted to say it was not needed forpy_func_v4 (hence the failure as it wasnt using the scripts plugin), but onlycli_func_v4. What you did here also works but is maybe less scalable as we need to do it for every module instead of the entire suite. So I'll leave it up to you, I'd say you could still add:

[testenv:cli_func_v4]deps = -r{toxinidir}/requirements-docker.txtcommands =  pytest --script-launch-mode=subprocess --cov --cov-report xml tests/functional/cli {posargs}

and it would work (but omit it for py_func_v4).

The reason I added subprocess mode initially I think was because it would more closely resemble the environment of a user running the CLI I believe.

Remove the pytest-console-scripts specific config from the global'[pytest]' config section.Use the command line option `--script-launch-mode=subprocess`Closes#1713
@JohnVillalovosJohnVillalovosforce-pushed thejlvillal/pytest_script_launch_mode branch from05ea611 toe80dcb1CompareNovember 27, 2021 17:15
@JohnVillalovos
Copy link
MemberAuthor

Thanks@JohnVillalovos. I hope my comment wasn't too confusing. What you did intox.ini would also work, I just wanted to say it was not needed forpy_func_v4 (hence the failure as it wasnt using the scripts plugin), but onlycli_func_v4. What you did here also works but is maybe less scalable as we need to do it for every module instead of the entire suite. So I'll leave it up to you, I'd say you could still add:

Thanks@nejch When I got the error before when using the command line argument--script-launch-mode=subprocess I just went and worked around it. I didn't realize that the reason it failed inpy_func_v4 was because it wasn't using the plugin. I knew it was being installed so I assumed the command line argument should also work. I'm guessing that if it doesn't use the plugin then the command-line plugin arguments don't get added.

@nejchnejch merged commit1badfeb intomainNov 27, 2021
@nejchnejch deleted the jlvillal/pytest_script_launch_mode branchNovember 27, 2021 17:26
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@nejchnejchAwaiting requested review from nejch

Assignees

@JohnVillalovosJohnVillalovos

Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

Self-test failures on Fedora 35 (python 3.10)
2 participants
@JohnVillalovos@nejch

[8]ページ先頭

©2009-2025 Movatter.jp