Skip to content

Commit d0c8c32

Browse files
committed
Fix tests
1 parent 7530fad commit d0c8c32

3 files changed

Lines changed: 9 additions & 3 deletions

File tree

libjpeg/tests/__init__.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11

2-
from . import pydicom_handler as handler
2+
try:
3+
from . import pydicom_handler as handler
4+
except ImportError:
5+
pass
6+
37

48
def add_handler():
59
"""Add the pixel data handler to *pydicom*.

libjpeg/tests/test_decode.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,12 @@
1010
try:
1111
import pydicom
1212
from pydicom.encaps import generate_pixel_data_frame
13+
from . import handler
1314
HAS_PYDICOM = True
1415
except ImportError:
1516
HAS_PYDICOM = False
1617

17-
from . import add_handler, remove_handler, handler
18+
from . import add_handler, remove_handler
1819
from libjpeg import decode
1920
from libjpeg.data import get_indexed_datasets, JPEG_DIRECTORY
2021

libjpeg/tests/test_handler.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,12 @@
1010
import pydicom.config
1111
from pydicom.pixel_data_handlers.util import convert_color_space
1212
from pydicom.encaps import defragment_data
13+
from . import handler
1314
HAS_PYDICOM = True
1415
except ImportError:
1516
HAS_PYDICOM = False
1617

17-
from . import add_handler, remove_handler, handler
18+
from . import add_handler, remove_handler
1819
from libjpeg import decode
1920
from libjpeg.data import get_indexed_datasets
2021

0 commit comments

Comments
 (0)