Skip to content

Add tests for quantities.constants - #280

Open
apdavison wants to merge 1 commit into
python-quantities:masterfrom
apdavison:constants-tests
Open

apdavison wants to merge 1 commit into
python-quantities:masterfrom
apdavison:constants-tests

Conversation

@apdavison

Copy link
Copy Markdown
Contributor

test_constants.py has contained only imports since it was created in 2009. It now checks that every constant can be simplified to a finite, non-zero value, that key constants have the expected units, and that physical relations between constants (e.g. hbar = h/2π, R = N_A k, α = e²/4πε₀ħc) hold to within CODATA's rounding. The relations catch constants that are mapped to the wrong CODATA entry, which matters when the data are updated to a new CODATA edition (#278).

test_constants.py has contained only imports since it was created in 2009. It now checks that every constant can be simplified to a finite, non-zero value, that key constants have the expected units, and that physical relations between constants (e.g. hbar = h/2π, R = N_A k, α = e²/4πε₀ħc) hold to within CODATA's rounding. The relations catch constants that are mapped to the wrong CODATA entry, which matters when the data are updated to a new CODATA edition (python-quantities#278).
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.

1 participant