Skip to content
Browse files

GC between tests to work around fd leaks.

  • Loading branch information...
1 parent dd2dca2 commit 4d309a3fcdebbdc8d70755d782a0b10c668251ca @natduca committed Apr 8, 2012
Showing with 6 additions and 3 deletions.
  1. +3 −0 TODO
  2. +3 −3 src/test_runner.py
View
3 TODO
@@ -1,6 +1,9 @@
Bugs
---------------------------------------------------------------------------
+Rewrite to use multiprocessing.Proces instead of Pool to reduce
+fd-leak-until-GC during tests
+
Emacs ff-find-*-file mode doesnt work in non-GUI environment
[curses UI being async is the core issue]
View
6 src/test_runner.py
@@ -53,10 +53,10 @@ def _pre_run_hook(self):
_before = _get_open_fds()
def _post_run_hook(self, result, test):
- if self.options.check_for_fd_leaks:
- import gc
- gc.collect()
+ import gc
+ gc.collect()
+ if self.options.check_for_fd_leaks:
global _before
after = _get_open_fds()
dif = after.difference(_before)

0 comments on commit 4d309a3

Please sign in to comment.
Something went wrong with that request. Please try again.