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

Update version specifiers #15

Merged
merged 2 commits into from
Sep 5, 2022
Merged

Update version specifiers #15

merged 2 commits into from
Sep 5, 2022

Conversation

yamaton
Copy link
Owner

@yamaton yamaton commented Sep 3, 2022

Copy link
Collaborator

@abrahammurciano abrahammurciano left a comment

Choose a reason for hiding this comment

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

Why change to single quotes? Black's style always prefers double quotes

@yamaton
Copy link
Owner Author

yamaton commented Sep 3, 2022

doctest is dumb and compares outputs character by character. Only single-quote strings work as far as I know. You can check with

$ pytest --doctest-modules condax/utils.py
================================================= test session starts ==================================================
platform linux -- Python 3.10.5, pytest-7.1.2, pluggy-1.0.0
rootdir: /home/vierbein/repos/condax
collected 1 item

condax/utils.py F                                                                                                [100%]

======================================================= FAILURES =======================================================
_______________________________________ [doctest] condax.utils.split_match_specs _______________________________________
015
016     Split package match specification into (<package name>, <rest>)
017     https://docs.conda.io/projects/conda/en/latest/user-guide/concepts/pkg-specs.html#package-match-specifications
018
019     Assume the argument `package_with_specs` is unquoted.
020
021     >>> split_match_specs("numpy=1.11")
Expected:
    ("numpy", "=1.11")
Got:
    ('numpy', '=1.11')

/home/vierbein/repos/condax/condax/utils.py:21: DocTestFailure
=============================================== short test summary info ================================================
FAILED condax/utils.py::condax.utils.split_match_specs
================================================== 1 failed in 0.02s ===================================================

@yamaton yamaton merged commit 6b28239 into dev Sep 5, 2022
@yamaton yamaton deleted the version-specifiers branch September 5, 2022 15:53
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