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

Fix different package casing in tests #8298

Merged
merged 1 commit into from
May 22, 2020

Conversation

uranusjr
Copy link
Member

The most simple cases

@uranusjr uranusjr added C: new resolver C: tests Testing and related things skip news Does not need a NEWS file entry (eg: trivial changes) labels May 22, 2020
Copy link
Member

@pfmoore pfmoore left a comment

Choose a reason for hiding this comment

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

Doing it this way, these tests will start failing again when the new resolver becomes default. Instead, we should do a case insensitive test (assuming we're not going to fix the reporting to use the case the user entered). So assert 'whatever, all in lowercase' in script.stdout.lower().

We could be more clever, I guess, but that should be sufficient...

@uranusjr uranusjr force-pushed the different-messages branch from 879ea45 to 52c48a4 Compare May 22, 2020 10:22
Copy link
Member

@pfmoore pfmoore left a comment

Choose a reason for hiding this comment

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

It still looks ugly TBH, but it does the job, which is the main thing.

(We really shouldn't be testing for exact content of error messages like this, but that's a problem for another day).

@pfmoore pfmoore merged commit 5b35203 into pypa:master May 22, 2020
@uranusjr uranusjr deleted the different-messages branch May 22, 2020 11:41
@pfmoore
Copy link
Member

pfmoore commented May 22, 2020

We actually raise the wrong exception here, which is why the messages still didn't match. I'm preparing a new fix (using re to only make the package name case insensitive, because I'm picky 🙂).

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 14, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
C: tests Testing and related things skip news Does not need a NEWS file entry (eg: trivial changes)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants