Skip to content

Add test for exact googol (10**100) in intword#304

Open
BlocksecPHD wants to merge 1 commit intopython-humanize:mainfrom
BlocksecPHD:add-googol-test
Open

Add test for exact googol (10**100) in intword#304
BlocksecPHD wants to merge 1 commit intopython-humanize:mainfrom
BlocksecPHD:add-googol-test

Conversation

@BlocksecPHD
Copy link
Copy Markdown

@BlocksecPHD BlocksecPHD commented Mar 31, 2026

Summary

This PR adds a test case for exact googol (10**100) in intword() function.

Context

Changes

Added test case ([10**100], "1.0 googol") to tests/test_number.py

Testing

The test passes on the current repo code (which already includes the fix from PR #273). This ensures the googol edge case is covered in the test suite for future releases.

Fixes #134

@hugovk hugovk added the changelog: skip Exclude PR from release draft label Apr 1, 2026
@codecov
Copy link
Copy Markdown

codecov bot commented Apr 1, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.54%. Comparing base (92b4117) to head (853e9e4).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #304   +/-   ##
=======================================
  Coverage   99.54%   99.54%           
=======================================
  Files          11       11           
  Lines         871      871           
=======================================
  Hits          867      867           
  Misses          4        4           
Flag Coverage Δ
macos-latest 97.47% <ø> (ø)
ubuntu-latest 97.47% <ø> (ø)
windows-latest 95.52% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@hugovk
Copy link
Copy Markdown
Member

hugovk commented Apr 1, 2026

Testing

This test will pass once version 4.15.0 (containing the fix from PR #273) is released to PyPI.

What do you mean? It has been released: https://pypi.org/project/humanize/4.15.0/

And why does it matter if it's released to PyPI? The tests test the code in this repo.

@BlocksecPHD
Copy link
Copy Markdown
Author

Hi @hugovk, thank you for pointing that out! You're right - the tests test the code in this repo, not the PyPI package.

I've updated the PR description to correct that misleading statement. The test passes on the current repo code (which already has the fix from PR #273), and ensures the googol edge case is covered in the test suite.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog: skip Exclude PR from release draft

Projects

None yet

Development

Successfully merging this pull request may close these issues.

intword fails to parse numbers >= 1 Googol

2 participants