diff roundup/test/memorydb.py @ 6491:087cae2fbcea

Handle more ResourceWarning issues. admin.py - remove unneeded close. mailer.py - close debug log file. indexer.py - close read of version file memorydb.py - close python files being compled. Similiar to instance. not sure why it's compoing things and not just letting instance do it. .travis.ymv disable all except 3.9-dev till we get a handle on errors. also increase errors to 50 from 20.
author John Rouillard <rouilj@ieee.org>
date Mon, 06 Sep 2021 16:03:31 -0400
parents 7f00fc5958ca
children 4351c95faace
line wrap: on
line diff
--- a/roundup/test/memorydb.py	Mon Sep 06 15:14:58 2021 -0400
+++ b/roundup/test/memorydb.py	Mon Sep 06 16:03:31 2021 -0400
@@ -63,8 +63,9 @@
     for fn in os.listdir(dirname):
         if not fn.endswith('.py'): continue
         vars = {}
-        exec(compile(open(os.path.join(dirname, fn)).read(),
-                     os.path.join(dirname, fn), 'exec'), vars)
+        with open(os.path.join(dirname, fn)) as fd:
+            exec(compile(fd.read(),
+                         os.path.join(dirname, fn), 'exec'), vars)
         vars['init'](db)
 
     tx_Source_init(db)

Roundup Issue Tracker: http://roundup-tracker.org/