Skip to content

Commit

Permalink
new test to test importing automation works. It needs to be it's own …
Browse files Browse the repository at this point in the history
…test since the other test files mess with imports and state and caches
  • Loading branch information
CamDavidsonPilon committed Sep 19, 2023
1 parent 9da5154 commit 86092eb
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 2 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,9 @@ jobs:
EOT
- name: Run tests
run: pytest pioreactor/tests/ -vv --timeout 600 --random-order --durations 15
run: |
pytest pioreactor/tests/ -vv --timeout 600 --random-order --durations 15
pytest pioreactor/tests/test_automation_imports.py
env:
TESTING: 1
TMPDIR: /tmp/
15 changes: 15 additions & 0 deletions pioreactor/tests/test_automation_imports.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# -*- coding: utf-8 -*-
# test_automation_imports
from __future__ import annotations

from pioreactor.background_jobs.temperature_control import start_temperature_control


def test_start_temperature_control():
import importlib

importlib.invalidate_caches()
with start_temperature_control(
"thermostat", "test", "test_start_temperature_control", target_temperature=30
):
pass
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# -*- coding: utf-8 -*-
# test_automation.py
from __future__ import annotations

from pioreactor.structs import Automation
Expand Down

0 comments on commit 86092eb

Please sign in to comment.