From d6cee750bc73f05b72413e0f96bca73fe2684c2d Mon Sep 17 00:00:00 2001 From: Kelsey Hawley Date: Wed, 18 Dec 2013 18:23:15 -0800 Subject: [PATCH] updating the test fixture for ndbm. whichdb needs the filename w/o '.db' to correctly identify and dbm.open does not the extension to read it --- tests/test_dump-anydbm.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/tests/test_dump-anydbm.py b/tests/test_dump-anydbm.py index d71384e..0a5617d 100644 --- a/tests/test_dump-anydbm.py +++ b/tests/test_dump-anydbm.py @@ -54,17 +54,16 @@ def make_gdbm_test_db(request): def make_ndbm_test_db(request): db_name = "test_ndbm" print "creating", db_name - open(db_name+".db", 'a').close() - test_db = ndbm.open(db_name+".db", "n") + test_db = ndbm.open(db_name, "n") test_db['very first key'] = 'very first value' test_db['second key'] = 'second value' test_db.close() def delete_test_ndbm(): print "deleting", db_name - # os.remove(db_name+".db") + os.remove(db_name+".db") request.addfinalizer(delete_test_ndbm) - return db_name+".db" + return db_name @pytest.fixture(scope = "function") def make_dumbdbm_test_db(request):