Skip to content

Commit 1d249fa

Browse files
authored
Make 4.9.2 release containing fix for tests that depend on Categories (#263)
1 parent 05bbaad commit 1d249fa

File tree

3 files changed

+28
-1
lines changed

3 files changed

+28
-1
lines changed

CHANGES.rst

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,21 @@
22
Envisage CHANGELOG
33
====================
44

5+
Version 4.9.2
6+
=============
7+
8+
Released: 2020-02-17
9+
10+
This is a bugfix release that fixes tests that assumed the existence
11+
of categories machinery (which is removed in Traits 6.0.0).
12+
13+
Fixes
14+
-----
15+
16+
- Conditionally skip tests that fail against Traits 6.0.0 due to the removal
17+
of Categories. (#263)
18+
19+
520
Version 4.9.1
621
=============
722

envisage/tests/test_core_plugin.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,14 @@
1818
from traits.api import HasTraits, Int, Interface, List
1919
from traits.testing.unittest_tools import unittest
2020

21+
# Categories were removed in Traits 6.0
22+
try:
23+
from traits.api import Category as traits_category # noqa: F401
24+
except ImportError:
25+
categories_available = False
26+
else:
27+
categories_available = True
28+
2129

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

148+
@unittest.skipUnless(
149+
categories_available, "Traits categories not available")
140150
def test_categories(self):
141151
""" categories """
142152

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

189+
@unittest.skipUnless(
190+
categories_available, "Traits categories not available")
179191
def test_dynamically_added_category(self):
180192
""" dynamically added category """
181193

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
# into the package source.
2121
MAJOR = 4
2222
MINOR = 9
23-
MICRO = 1
23+
MICRO = 2
2424
IS_RELEASED = True
2525

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

0 commit comments

Comments
 (0)