forked from fedora-python/python26
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpython26-skip-db-tests.patch
82 lines (81 loc) · 2.38 KB
/
python26-skip-db-tests.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
diff --git a/Lib/test/test_anydbm.py b/Lib/test/test_anydbm.py
index a01dd0b..f1387d7 100644
--- a/Lib/test/test_anydbm.py
+++ b/Lib/test/test_anydbm.py
@@ -43,25 +43,6 @@ class AnyDBMTestCase(unittest.TestCase):
self.read_helper(f)
f.close()
- def test_anydbm_modification(self):
- self.init_db()
- f = anydbm.open(_fname, 'c')
- self._dict['g'] = f['g'] = "indented"
- self.read_helper(f)
- f.close()
-
- def test_anydbm_read(self):
- self.init_db()
- f = anydbm.open(_fname, 'r')
- self.read_helper(f)
- f.close()
-
- def test_anydbm_keys(self):
- self.init_db()
- f = anydbm.open(_fname, 'r')
- keys = self.keys_helper(f)
- f.close()
-
def read_helper(self, f):
keys = self.keys_helper(f)
for key in self._dict:
diff --git a/Lib/test/test_whichdb.py b/Lib/test/test_whichdb.py
index 5a8d630..f6a7d9d 100644
--- a/Lib/test/test_whichdb.py
+++ b/Lib/test/test_whichdb.py
@@ -22,47 +22,3 @@ def _delete_files():
os.unlink(f)
except OSError:
pass
-
-class WhichDBTestCase(unittest.TestCase):
- # Actual test methods are added to namespace
- # after class definition.
- def __init__(self, *args):
- unittest.TestCase.__init__(self, *args)
-
- def tearDown(self):
- _delete_files()
-
- def setUp(self):
- _delete_files()
-
-for name in anydbm._names:
- # we define a new test method for each
- # candidate database module.
- try:
- # Silence Py3k warning
- mod = test.test_support.import_module(name, deprecated=True)
- except test.test_support.TestSkipped:
- continue
-
- def test_whichdb_name(self, name=name, mod=mod):
- # Check whether whichdb correctly guesses module name
- # for databases opened with module mod.
- # Try with empty files first
- f = mod.open(_fname, 'c')
- f.close()
- self.assertEqual(name, whichdb.whichdb(_fname))
- # Now add a key
- f = mod.open(_fname, 'w')
- f["1"] = "1"
- f.close()
- self.assertEqual(name, whichdb.whichdb(_fname))
- setattr(WhichDBTestCase,"test_whichdb_%s" % name, test_whichdb_name)
-
-def test_main():
- try:
- test.test_support.run_unittest(WhichDBTestCase)
- finally:
- _delete_files()
-
-if __name__ == "__main__":
- test_main()