Skip to content

Commit

Permalink
test(multiple) : adding tests to the main (#23)
Browse files Browse the repository at this point in the history
* build: rename package name and pyproject toml

* docs: modified name in license

* 11 modify the module name from dcm anon to dcm anon (#17)

* fix(modulename): update to dcm_anon

* added a dummy test to ci pipeline

* test: Added stubs for missing tests

* refactor: Modified date and time from datetime more library based than using string manipulation

* test: added tests for datetime after modifying datetime but tests dont run on local

* test: added type annotation

* build: added dicom_Csv and corrected imports tests now run

* test: added tests for hash and datetime

* test: added tests for utils

* build: rename package name and pyproject toml

* docs: modified name in license

* 11 modify the module name from dcm anon to dcm anon (#17)

* fix(modulename): update to dcm_anon

* added a dummy test to ci pipeline

* test: Added stubs for missing tests

* refactor: Modified date and time from datetime more library based than using string manipulation

* test: added tests for datetime after modifying datetime but tests dont run on local

* test: added type annotation

* build: added dicom_Csv and corrected imports tests now run

* test: added tests for hash and datetime

* refactor: Made relative imports

* test: added tests for hash and datetime

* build: rename package name and pyproject toml

* docs: modified name in license

* 11 modify the module name from dcm anon to dcm anon (#17)

* fix(modulename): update to dcm_anon

* added a dummy test to ci pipeline

* test: Added stubs for missing tests

* refactor: Modified date and time from datetime more library based than using string manipulation

* test: added tests for datetime after modifying datetime but tests dont run on local

* test: added type annotation

* build: added dicom_Csv and corrected imports tests now run

* test: added tests for hash and datetime

* refactor: Made relative imports

* refactor: made change to datetime

* test: added tests for datetime

* test: added tests for utils

* build: rename package name and pyproject toml

* docs: modified name in license

* 11 modify the module name from dcm anon to dcm anon (#17)

* fix(modulename): update to dcm_anon

* added a dummy test to ci pipeline

* test: Added stubs for missing tests

* refactor: Modified date and time from datetime more library based than using string manipulation

* test: added tests for datetime after modifying datetime but tests dont run on local

* test: added type annotation

* build: added dicom_Csv and corrected imports tests now run

* test: added tests for hash and datetime

* test: added tests for hash and datetime

* build: rename package name and pyproject toml

* docs: modified name in license

* 11 modify the module name from dcm anon to dcm anon (#17)

* fix(modulename): update to dcm_anon

* added a dummy test to ci pipeline

* test: Added stubs for missing tests

* refactor: Modified date and time from datetime more library based than using string manipulation

* test: added tests for datetime after modifying datetime but tests dont run on local

* test: added type annotation

* build: added dicom_Csv and corrected imports tests now run

* test: added tests for hash and datetime

* refactor: Made relative imports

* changed datetime (#21)

* build: rename package name and pyproject toml

* docs: modified name in license

* test: Added stubs for missing tests

* refactor: Modified date and time from datetime more library based than using string manipulation

* test: added tests for datetime after modifying datetime but tests dont run on local

* test: added type annotation

* build: added dicom_Csv and corrected imports tests now run

* test: added tests for hash and datetime

* refactor: Made relative imports

* refactor: made change to datetime

* test: added test stubs for dcm.py

* test: Added test for reading dicom

---------

Co-authored-by: Abinav R <31827335+AbinavRavi@users.noreply.github.com>
  • Loading branch information
a-parida12 and AbinavRavi authored Jan 31, 2024
1 parent e70994c commit dc45348
Show file tree
Hide file tree
Showing 7 changed files with 32 additions and 1 deletion.
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

0 comments on commit dc45348

Please sign in to comment.