Static type analysis
This commit is contained in:
parent
3aebb8bead
commit
7866ec0f47
63 changed files with 1825 additions and 2722 deletions
19
tests/test_api_utilities.py
Normal file
19
tests/test_api_utilities.py
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
import pytest
|
||||
|
||||
from openflexure_microscope.api import utilities
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
"test_input,expected",
|
||||
[
|
||||
("true", True),
|
||||
("True", True),
|
||||
("1", True),
|
||||
(True, True),
|
||||
("false", False),
|
||||
("somestring", False),
|
||||
(False, False),
|
||||
],
|
||||
)
|
||||
def test_get_bool(test_input, expected):
|
||||
assert utilities.get_bool(test_input) == expected
|
||||
Loading…
Add table
Add a link
Reference in a new issue