Skip to content

Commit

Permalink
Make 4.9.2 release containing fix for tests that depend on Categories (
Browse files Browse the repository at this point in the history
  • Loading branch information
mdickinson authored Feb 17, 2020
1 parent 05bbaad commit 1d249fa
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 1 deletion.
15 changes: 15 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,21 @@
Envisage CHANGELOG
====================

Version 4.9.2
=============

Released: 2020-02-17

This is a bugfix release that fixes tests that assumed the existence
of categories machinery (which is removed in Traits 6.0.0).

Fixes
-----

- Conditionally skip tests that fail against Traits 6.0.0 due to the removal
of Categories. (#263)


Version 4.9.1
=============

Expand Down
12 changes: 12 additions & 0 deletions envisage/tests/test_core_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,14 @@
from traits.api import HasTraits, Int, Interface, List
from traits.testing.unittest_tools import unittest

# Categories were removed in Traits 6.0
try:
from traits.api import Category as traits_category # noqa: F401
except ImportError:
categories_available = False
else:
categories_available = True


# This module's package.
PKG = 'envisage.tests'
Expand Down Expand Up @@ -137,6 +145,8 @@ def _my_service_factory(self, **properties):
service = application.get_service(IMyService)
self.assertEqual(42, service)

@unittest.skipUnless(
categories_available, "Traits categories not available")
def test_categories(self):
""" categories """

Expand Down Expand Up @@ -176,6 +186,8 @@ class Bar(HasTraits):
# place! This test works for me on Python 2.4!
self.assertTrue('y' in Bar.class_traits())

@unittest.skipUnless(
categories_available, "Traits categories not available")
def test_dynamically_added_category(self):
""" dynamically added category """

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
# into the package source.
MAJOR = 4
MINOR = 9
MICRO = 1
MICRO = 2
IS_RELEASED = True

# If this file is part of a Git export (for example created with "git archive",
Expand Down

0 comments on commit 1d249fa

Please sign in to comment.