[pypy-commit] pypy default: Write a skipped test as documentation
arigo
noreply at buildbot.pypy.org
Tue May 19 22:21:58 CEST 2015
Author: Armin Rigo <arigo at tunes.org>
Branch:
Changeset: r77413:182864d41352
Date: 2015-05-19 22:22 +0200
http://bitbucket.org/pypy/pypy/changeset/182864d41352/
Log: Write a skipped test as documentation
diff --git a/pypy/module/test_lib_pypy/test_dbm_extra.py b/pypy/module/test_lib_pypy/test_dbm_extra.py
--- a/pypy/module/test_lib_pypy/test_dbm_extra.py
+++ b/pypy/module/test_lib_pypy/test_dbm_extra.py
@@ -61,3 +61,16 @@
db = dbm.open('test', 'r')
assert db['1'] == 'a\x00b'
db.close()
+
+def test_key_with_empty_value():
+ # this test fails on CPython too (at least on tannit), and the
+ # case shows up when gdbm is not installed and test_anydbm.py
+ # falls back dbm.
+ py.test.skip("test may fail on CPython too")
+ path = str(udir.join('test_dbm_extra.test_key_with_empty_value'))
+ d = dbm.open(path, 'c')
+ assert 'key_with_empty_value' not in d
+ d['key_with_empty_value'] = ''
+ assert 'key_with_empty_value' in d
+ assert d['key_with_empty_value'] == ''
+ d.close()
More information about the pypy-commit
mailing list