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

Avoid overly-specific assertion about charset-normalizer result #84

Merged
merged 1 commit into from
Nov 30, 2023

Conversation

harto
Copy link
Contributor

@harto harto commented Nov 23, 2023

We don't pin charset-normalizer versions, so this test is liable to flake as changes are made to that library.

  • charset-normalizer 3.2.0 reports this encoding as cp037.
  • charset-normalizer 3.3.0 reports it as CP949.
  • charset-normalizer 3.3.1 and 3.3.2 report it as Big5.

So, we change the assertion here to be less specific (since we don't really care what specific encoding is returned — just that it's usable).

@harto harto force-pushed the fix-encoding-detection-test branch from 783fe05 to 276c056 Compare November 23, 2023 00:17
@harto harto requested a review from dget November 23, 2023 00:17
@harto harto changed the title Update test to reflect charset-normalizer updates Avoid overly-specific assertion about charset-normalizer result Nov 23, 2023
We don't pin charset-normalizer versions, so assertions about its
behaviour are likely to flake. For example:

- charset-normalizer 3.2.0 reports this encoding as cp037.
- charset-normalizer 3.3.0 reports it as CP949.
- charset-normalizer 3.3.1 and 3.3.2 report it as Big5.

We don't care so much what the exact encoding is; we just care that we
get a usable result. So, we change our assertion here to be much less
specific.
@harto harto force-pushed the fix-encoding-detection-test branch from da2370d to 5b61461 Compare November 23, 2023 00:31
@harto harto mentioned this pull request Nov 23, 2023
@harto harto merged commit e68fa25 into master Nov 30, 2023
4 checks passed
@harto harto deleted the fix-encoding-detection-test branch November 30, 2023 22:27
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