Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test(multiple) : adding tests to the main #23

Merged
merged 2 commits into from
Jan 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added .DS_Store
Binary file not shown.
Binary file added tests/.DS_Store
Binary file not shown.
Binary file added tests/data/.DS_Store
Binary file not shown.
Binary file added tests/data/test1
Binary file not shown.
Binary file added tests/data/test2
Binary file not shown.
Empty file added tests/data/test_dcm.txt
Empty file.
33 changes: 32 additions & 1 deletion tests/test_00_utils.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
import pytest
from dcm_anon.utils.datetime import get_datetime, get_date, get_time
from dcm_anon.utils.hash import encrypt_string, get_digits, get_non_digits
from dcm_anon.utils.dcm import check_valid_dcm # , bare_bones_ui, get_dicom_csv


@pytest.fixture
def tests_data():
yield "./tests/data/"


@pytest.mark.utils
Expand Down Expand Up @@ -45,4 +51,29 @@ def test_get_non_digits() -> None:
test_string = "1a2b3c"
op = get_non_digits(test_string)
assert op == "abc"
assert type(op) == str
assert type(op) == str


@pytest.mark.utils
def test_check_valid_dcm(tests_data):
dicom_file = tests_data + "test1"
assert check_valid_dcm(dicom_file) is True

dicom_file = tests_data + "test2"
assert check_valid_dcm(dicom_file) is True


@pytest.mark.utils
def test_check_invalid_dcm(tests_data):
file = tests_data + "test_dcm.txt"
assert check_valid_dcm(file) is False


@pytest.mark.utils
def test_bare_bones_ui():
pass


@pytest.mark.utils
def test_get_dicom_csv():
pass
Loading