-
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.
version 1.7.1
- Loading branch information
Showing
6 changed files
with
42 additions
and
9 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
[tool.poetry] | ||
name = "pyobs-core" | ||
packages = [{ include = "pyobs" }] | ||
version = "1.7.0" | ||
version = "1.7.1" | ||
description = "robotic telescope software" | ||
authors = ["Tim-Oliver Husser <[email protected]>"] | ||
license = "MIT" | ||
|
Empty file.
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,30 @@ | ||
import asyncio | ||
import logging | ||
|
||
import pytest | ||
|
||
from pyobs.modules.test import StandAlone | ||
|
||
|
||
def test_default(): | ||
module = StandAlone() | ||
assert module._message == "Hello world" | ||
assert module._interval == 10 | ||
|
||
|
||
@pytest.mark.asyncio | ||
async def test_loop(mocker, caplog): | ||
mocker.patch("asyncio.sleep", return_value=None) | ||
module = StandAlone("Testmessage", 3) | ||
|
||
with caplog.at_level(logging.INFO): | ||
await module._loop() | ||
|
||
assert caplog.messages[0] == "Testmessage" | ||
asyncio.sleep.assert_called_once_with(3) | ||
|
||
|
||
@pytest.mark.asyncio | ||
async def test_background_task(): | ||
module = StandAlone() | ||
assert module._message_func in module._background_tasks |
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