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

default pytest version doesn't support pyproject.toml configuration #3834

Closed
3 tasks done
howeaj opened this issue Mar 25, 2021 · 3 comments
Closed
3 tasks done

default pytest version doesn't support pyproject.toml configuration #3834

howeaj opened this issue Mar 25, 2021 · 3 comments
Labels
kind/bug Something isn't working as expected

Comments

@howeaj
Copy link

howeaj commented Mar 25, 2021

  • I am on the latest Poetry version.
  • I have searched the issues of this repo and believe that this is not a duplicate.
  • If an exception occurs when executing a command, I executed it again in debug mode (-vvv option).
  • OS version and name: Windows 10
  • Poetry version: 1.1.5

Issue

The default pyproject.toml that poetry new creates includes an old version of pytest that is not compatible with pyproject.toml configuration. I'd expect it to give you the same version you'd get if adding it with poetry add.

i.e. the pytest = "^5.2" that it gives you will ignore any config such as

[tool.pytest.ini_options]
log_cli=true
log_level="DEBUG"

Which is quite unhelpful.

I'd assumed poetry would have just given me the latest version of pytest, as it does when running poetry add, and so wasted an hour or so trying to debug this issue, thinking I had done something wrong in configuring poetry.

@howeaj howeaj added kind/bug Something isn't working as expected status/triage This issue needs to be triaged labels Mar 25, 2021
@pmav99
Copy link
Contributor

pmav99 commented Mar 27, 2021

if parse_constraint("<3.5").allows_any(python_constraint):
dev_dependencies["pytest"] = "^4.6"
if parse_constraint(">=3.5").allows_all(python_constraint):
dev_dependencies["pytest"] = "^5.2"

@finswimmer
Copy link
Member

Hello @pmav99,

we will most likely remove this in a future release completely. See #2768

fin swimmer

@abn abn removed the status/triage This issue needs to be triaged label Mar 3, 2022
Copy link

github-actions bot commented Mar 2, 2024

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/bug Something isn't working as expected
Projects
None yet
Development

No branches or pull requests

4 participants