Handles testing gracefully when PIL not present.
If PIL is not present, certain writing tests should not be run. These tests would show up as errors instead. Closes #102.
This commit is contained in:
parent
0f7752d085
commit
d036c12a07
1 changed files with 6 additions and 0 deletions
|
|
@ -29,6 +29,12 @@ NO_READ_BACKEND_MSG += "order to run the tests in this suite."
|
||||||
|
|
||||||
try:
|
try:
|
||||||
from matplotlib.pyplot import imread
|
from matplotlib.pyplot import imread
|
||||||
|
|
||||||
|
# The whole point of trying to import PIL is to determine if it's there
|
||||||
|
# or not. We won't use it directly.
|
||||||
|
# pylint: disable=F0401,W0611
|
||||||
|
import PIL
|
||||||
|
|
||||||
NO_READ_BACKEND = False
|
NO_READ_BACKEND = False
|
||||||
except ImportError:
|
except ImportError:
|
||||||
NO_READ_BACKEND = True
|
NO_READ_BACKEND = True
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue