Import of pkgsrc-2015Q1

This commit is contained in:
2015-04-22 14:34:26 +02:00
committed by Lionel Sambuc
parent 9a8c06dafb
commit 4af1cdf7a9
25114 changed files with 870550 additions and 795435 deletions

View File

@@ -0,0 +1,21 @@
$NetBSD: patch-Lib_test_test__dumbdbm.py,v 1.1 2015/03/03 17:19:58 snj Exp $
http://bugs.python.org/issue22885
--- Lib/test/test_dumbdbm.py.orig 2015-03-03 09:05:53.000000000 -0800
+++ Lib/test/test_dumbdbm.py 2015-03-03 09:10:02.000000000 -0800
@@ -160,6 +160,14 @@ class DumbDBMTestCase(unittest.TestCase)
self.assertEqual(expected, got)
f.close()
+ def test_eval(self):
+ with open(_fname + '.dir', 'w') as stream:
+ stream.write("str(__import__('sys').stdout.write('Hacked!')), 0\n")
+ with test_support.captured_stdout() as stdout:
+ with self.assertRaises(ValueError):
+ dumbdbm.open(_fname).close()
+ self.assertEqual(stdout.getvalue(), '')
+
def tearDown(self):
_delete_files()