Author: Ronan Lamy <ronan.l...@gmail.com> Branch: cleanup-test_lib_pypy Changeset: r95417:22d96ea1b35e Date: 2018-12-05 04:59 +0000 http://bitbucket.org/pypy/pypy/changeset/22d96ea1b35e/
Log: Move test_gdbm_extra diff --git a/pypy/module/test_lib_pypy/test_gdbm_extra.py b/extra_tests/test_gdbm.py rename from pypy/module/test_lib_pypy/test_gdbm_extra.py rename to extra_tests/test_gdbm.py --- a/pypy/module/test_lib_pypy/test_gdbm_extra.py +++ b/extra_tests/test_gdbm.py @@ -1,13 +1,8 @@ -from __future__ import absolute_import -import py -from rpython.tool.udir import udir -try: - from lib_pypy import gdbm -except ImportError as e: - py.test.skip(e) +import pytest +gdbm = pytest.importorskip('gdbm') -def test_len(): - path = str(udir.join('test_gdbm_extra')) +def test_len(tmpdir): + path = str(tmpdir.join('test_gdbm_extra')) g = gdbm.open(path, 'c') g['abc'] = 'def' assert len(g) == 1 @@ -16,6 +11,6 @@ del g['abc'] assert len(g) == 1 -def test_unicode(): - path = unicode(udir.join('test_gdm_unicode')) +def test_unicode(tmpdir): + path = unicode(tmpdir.join('test_gdm_unicode')) g = gdbm.open(path, 'c') # does not crash _______________________________________________ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit