Author: Armin Rigo <ar...@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() _______________________________________________ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit