Skip to content

Fix/improve tests #146

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

Merged
merged 3 commits into from
May 26, 2025
Merged

Fix/improve tests #146

merged 3 commits into from
May 26, 2025

Conversation

drinkcat
Copy link
Contributor

I was playing with jiff conversion, and noticed those tests that could be improved.


src/items: Fix timezone tests

The current tests look wrong ("%Z" shouldn't print an offset, but
this accidentally works due to the way the parsing logic operates),
fix that.

test: Replace %+ format with explicit one

%+ is an extension that jiff doesn't support (if we still want to
convert parse_datetime in the future, and since these are tests,
it's probably better to use an explicit format.

src/lib: Add end-to-end timezone test

Also make the offset test a little bit smarter.

drinkcat added 3 commits May 25, 2025 21:34
Also make the offset test a little bit smarter.
%+ is an extension that jiff doesn't support (if we still want to
convert parse_datetime in the future, and since these are tests,
it's probably better to use an explicit format.
The current tests look wrong ("%Z" shouldn't print an offset, but
this accidentally works due to the way the parsing logic operates),
fix that.
@drinkcat
Copy link
Contributor Author

I disagree with clippy here (1 * 3600 is better than 3600) -- changed the test to use +2 timezone.

@drinkcat
Copy link
Contributor Author

Fuzzer fail is fixed by #145.

@cakebaker cakebaker merged commit 6f073ad into uutils:main May 26, 2025
16 of 17 checks passed
@cakebaker
Copy link
Collaborator

Thanks!

Copy link

codecov bot commented May 26, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 0.00%. Comparing base (cc7c143) to head (a967662).
Report is 4 commits behind head on main.

Additional details and impacted files
@@     Coverage Diff     @@
##   main   #146   +/-   ##
===========================
===========================

☔ 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.

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