-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add tests for get_jobs * Add test for job_state * Fix timezones * blackify * Handle wrong job_id type * Calm down pylint * Add tzlocal fixture * Handle job_id is None * Fix node tests with new test config * Blackify * username -> user * Using | instead of Union * Validate json with txt instead of yml files * job_id=[] returns no jobs * Have 2 separate DB in tests One DB for read-only tests that can have a session scope to avoid wasting time on DB rebuild, and one DB for read-and-write tests that we must keep on test scope to avoid some tests impacting other tests. * blackify
- Loading branch information
Showing
27 changed files
with
3,335 additions
and
74 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import zoneinfo | ||
|
||
import pytest | ||
|
||
|
||
@pytest.fixture | ||
def tzlocal_is_mtl(monkeypatch): | ||
monkeypatch.setattr("sarc.config.TZLOCAL", zoneinfo.ZoneInfo("America/Montreal")) | ||
monkeypatch.setattr("sarc.jobs.job.TZLOCAL", zoneinfo.ZoneInfo("America/Montreal")) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.