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

Better testing #2125

Merged
merged 3 commits into from
Jan 27, 2025
Merged

Better testing #2125

merged 3 commits into from
Jan 27, 2025

Conversation

plajjan
Copy link
Contributor

@plajjan plajjan commented Jan 27, 2025

No description provided.

Kristian Larsson added 3 commits January 27, 2025 12:28
- Now printing 'A: None' and not just 'None' for None values - the
  if/else logic was wrong
- Changed default to always print values, even when custom error message
  is set - this seem to make more sense to me, let's see
- added print_vals arg throughout for user to explicitly disable
  printing values and just print the custom error message
- renamed assertIsTrue -> assertTrue & assertIsFalse -> assertFalse
  - in Python, None, True and False are singletons so it is idiomatic to
    use "is" "is not" but in Acton, they are not, None is C NULL and
    True and False are their own objects, so let's not encourage is
    checking these by having that in the assert names
- add test_testing project to show testing
  - this is not run automatically, since the idea is to showcase errors,
    which would then just fail CI
  - but very useful for a human to look at stuff
If a test is using the logging library, those messages are now captured.
Practically this happens simply by the test printing them to the
console (stderr) where the test runner already captures messages.
Just to be run manually to inspect the output.
@plajjan plajjan merged commit b134a6a into main Jan 27, 2025
25 of 26 checks passed
@plajjan plajjan deleted the better-testing branch January 27, 2025 12:16
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