LTA’s Unit Tests
Unit tests for LTA.
Tests for the parser
Tests for lta.parser.
- tests.unit.test_parser.test_correct_usage(capsys: _pytest.capture.CaptureFixture) None
It has the correct usage (ie. structure).
- tests.unit.test_parser.test_default_func() None
It has the correct default function.
Tests for the run command function
Tests for the simple command function.
- tests.unit.test_commands_run.test_prints_text(capsys: _pytest.capture.CaptureFixture) None
It prints the text.
Tests for the pipeline dataclass
Unit tests for lta.helpers.pipeline.
Testing datahandling can be a challenge, particularly for tools designed to handle compler, “omics” data. At the moment, only the basic error handling is tested. If you can provide any contributions towards better unit tests for data science, please reach out!
- tests.unit.test_helpers_pipeline.test_raise_NotDir(mocker: pytest_mock.plugin.MockerFixture, caplog: _pytest.capture.CaptureFixture) None
It handles IsADirectoryErrors.
- tests.unit.test_helpers_pipeline.test_raise_NotFound(caplog: _pytest.capture.CaptureFixture) None
It handles FileNotFoundErrors.
- tests.unit.test_helpers_pipeline.test_raise_Runtime(mocker: pytest_mock.plugin.MockerFixture, caplog: _pytest.capture.CaptureFixture) None
It fails if a file is empty.
Tests for the FloatRange Custom Type
Unit tests for the lta.helpers.custom_types module.
- tests.unit.test_helpers_custom_types.test_FloatRange_attributes() None
It has a start and end value.
- tests.unit.test_helpers_custom_types.test_FloatRange_contains() None
It checks the range contains a value.
- tests.unit.test_helpers_custom_types.test_FloatRange_iter() None
It is iterable.
- tests.unit.test_helpers_custom_types.test_FloatRange_repr(capsys: _pytest.capture.CaptureFixture) None
It correctly prints the repr.