Commit 189d7728 authored by Marius Gedminas's avatar Marius Gedminas

Add a failing test

The test fails on Python 3 only, and on non-pure builds only.  I added
PYTHONFAULTHANDLER=1 to the environment to make the failure less
mysteriously silent.

I've also updated tox.ini to use extras=foo instead of deps=.[foo] and
to use factors to set PURE_PYTHON=1 instead of defining an entire
environment.  This now lets you run arbitrary pure Python builds like
tox -e py37-pure.
parent 7e205796
......@@ -72,5 +72,18 @@ class TestBTreesUnicode(unittest.TestCase):
self.assertTrue(isinstance(k, str))
self.assertEqual(self.tree[k], v)
class TestBTreeBucketUnicode(unittest.TestCase):
def testUnicodeRepr(self):
# Regression test for
# https://github.com/zopefoundation/BTrees/issues/106
items = [(1, u'\uaabb')]
from BTrees.OOBTree import OOBucket
bucket = OOBucket(items)
self.assertEqual(repr(bucket),
'BTrees.OOBTree.OOBucket(%s)' % repr(items))
def test_suite():
return unittest.makeSuite(TestBTreesUnicode)
return unittest.defaultTestLoader.loadTestsFromName(__name__)
......@@ -7,22 +7,13 @@ envlist =
[testenv]
usedevelop = true
deps =
.[test]
extras =
test
commands =
zope-testrunner --test-path=. --auto-color --auto-progress []
[testenv:py27-pure]
basepython =
python2.7
setenv =
PURE_PYTHON = 1
[testenv:py35-pure]
basepython =
python3.5
setenv =
PURE_PYTHON = 1
PYTHONFAULTHANDLER=1
pure: PURE_PYTHON=1
#[testenv:jython]
#commands =
......@@ -32,7 +23,6 @@ setenv =
basepython =
python2.7
deps =
{[testenv]deps}
ZODB
[testenv:coverage]
......@@ -42,7 +32,6 @@ commands =
coverage run -m zope.testrunner --test-path=. --auto-color --auto-progress []
coverage report --fail-under=92
deps =
{[testenv]deps}
coverage
[testenv:docs]
......@@ -51,5 +40,5 @@ basepython =
commands =
sphinx-build -b html -d docs/_build/doctrees docs docs/_build/html
sphinx-build -b doctest -d docs/_build/doctrees docs docs/_build/doctest
deps =
.[docs]
extras =
docs
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment