Skip to content

Conversation

@jyaw
Copy link
Contributor

@jyaw jyaw commented Aug 29, 2022

#56 Put a common replace_with_user_tz() function in tests/util/utilities.py that defaults to using the TIMEZONE_NAME tz in the users .env file (TIMEZONE_NAME defaults to 'America/New_York' if no .env file).

Updated the applicable date strings with -04:00 in test_therapy_event.py as a trial and it seems to work for me, test come back ok. Easy to update for relavant datestamps in the test files.

This change would need to be accounted for in the following files to make tests return ok in timezones outside of EST...

  • domain/test_therapy_event.py (handled in this PR)
  • parser/test_tconnect.py
  • sync/test_bolus.py
  • sync/test_cgm.py
  • sync/test_iob.py
  • test_process.py

…faults to using the TIMEZONE_NAME tz in the users .env file, defaults to 'America/New_York' if no .env file. Updated the applicable date strings with -04:00 in test_therapy_event.py and it seems to work for me, test come back ok
@codecov-commenter
Copy link

codecov-commenter commented Aug 29, 2022

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 82.72%. Comparing base (ec84afd) to head (37e3b3f).
⚠️ Report is 190 commits behind head on master.

❌ Your project status has failed because the head coverage (71.74%) is below the target coverage (95.00%). You can increase the head coverage or adjust the target coverage.

Additional details and impacted files
@@            Coverage Diff             @@
##           master      #59      +/-   ##
==========================================
+ Coverage   82.69%   82.72%   +0.03%     
==========================================
  Files          46       47       +1     
  Lines        3039     3045       +6     
==========================================
+ Hits         2513     2519       +6     
  Misses        526      526              

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

@jwoglom
Copy link
Owner

jwoglom commented Aug 29, 2022

I'll take a look at updating the Github actions configuration so that tests run with both the default America/New_York and something custom.

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.

3 participants