Skip to content

Commit

Permalink
Fix test dependencies (#1055)
Browse files Browse the repository at this point in the history
Tests should run with just the "test" dependencies.

Fixes #543
  • Loading branch information
corranwebster committed May 15, 2023
1 parent f65de7f commit bb63034
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
1 change: 1 addition & 0 deletions enable/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
"cairo": ["pycairo"],
# Dependencies purely for running tests.
"test": [
"pyparsing", # for enable.savage tests
"PyPDF2<3.0", # for pdf drawing tests in kiva.
"setuptools",
],
Expand Down
2 changes: 1 addition & 1 deletion enable/tests/test_brush.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
import numpy as np
from numpy.testing import assert_array_equal

from kiva.celiagg import GraphicsContext
from kiva.image import GraphicsContext
from kiva.testing import KivaTestAssistant
from traits.testing.api import UnittestTools

Expand Down
9 changes: 8 additions & 1 deletion kiva/tests/test_celiagg_drawing.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,17 @@
# Thanks for using Enthought open source!
import unittest

from kiva.celiagg import GraphicsContext
from kiva.tests.drawing_tester import DrawingImageTester

try:
from kiva.celiagg import GraphicsContext
except ImportError:
CELIAGG_NOT_AVAILABLE = True
else:
CELIAGG_NOT_AVAILABLE = False


@unittest.skipIf(CELIAGG_NOT_AVAILABLE, "Cannot import celiagg")
class TestCeliaggDrawing(DrawingImageTester, unittest.TestCase):

def create_graphics_context(self, width=600, height=600, pixel_scale=2.0):
Expand Down

0 comments on commit bb63034

Please sign in to comment.