for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
import sys
The coding style of this project requires that you add a docstring to this code element. Below, you find an example for methods:
class SomeClass: def some_method(self): """Do x and return foo."""
If you would like to know more about docstrings, we recommend to read PEP-257: Docstring Conventions.
import logging
import unittest
from DICOM.validate import DICOM_validate
from DICOM.test_DICOM import get_test_DICOM_path
from pydicom.data import get_testdata_files
logging.basicConfig(stream=sys.stdout, level=logging.INFO)
class UT_DICOMValidation(unittest.TestCase):
UT_DICOMValidation
[A-Z_][a-zA-Z0-9]+$
This check looks for invalid names for a range of different identifiers.
You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.
If your project includes a Pylint configuration file, the settings contained in that file take precedence.
To find out more about Pylint, please refer to their site.
__class__
@staticmethod
def test_MRN():
test_MRN
(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$
string = 1234567
assert DICOM_validate.MRN(string)
string = "1234567"
string = "12345678"
assert not DICOM_validate.MRN(string)
string = 12345678
string = "123456"
string = 123456
def test_DICOM_validator():
test_DICOM_validator
file_name = get_test_DICOM_path()
success, _ = DICOM_validate.file(file_name)
assert success
file_name = get_testdata_files("README.txt")[0]
assert not success
The coding style of this project requires that you add a docstring to this code element. Below, you find an example for methods:
If you would like to know more about docstrings, we recommend to read PEP-257: Docstring Conventions.