From 8c92f2d24123b3ccc337021eaae7c52aeb92e412 Mon Sep 17 00:00:00 2001 From: Richard Frank Date: Thu, 21 Apr 2016 15:54:52 -0400 Subject: [PATCH] TST: What if we don't gc... Looks like we removed ref cycles elsewhere, so windows builds are passing without this. --- zipline/testing/fixtures.py | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/zipline/testing/fixtures.py b/zipline/testing/fixtures.py index 9748f0bb..27754226 100644 --- a/zipline/testing/fixtures.py +++ b/zipline/testing/fixtures.py @@ -1,5 +1,4 @@ from abc import ABCMeta, abstractproperty -import gc import sqlite3 from unittest import TestCase @@ -50,22 +49,6 @@ from zipline.pipeline.loaders.utils import ( ) -def _take_out_the_trash(): - """Force the gc to clear all innaccessible objects. - - This will only kill stranded reference cycles, objects that don't - participate in a cycle are destroyed when there are no more references. - - Notes - ----- - This function is used to ensure that objects that are holding open file - handles are destroyed, closing the files. On windows files cannot be - deleted if they are opened. - """ - while gc.collect(): - pass - - class ZiplineTestCase(with_metaclass(FinalMeta, TestCase)): """ Shared extensions to core unittest.TestCase. @@ -124,7 +107,6 @@ class ZiplineTestCase(with_metaclass(FinalMeta, TestCase)): @final @classmethod def tearDownClass(cls): - _take_out_the_trash() cls._class_teardown_stack.close() for name in set(vars(cls)) - cls._static_class_attributes: # Remove all of the attributes that were added after the class was @@ -189,7 +171,6 @@ class ZiplineTestCase(with_metaclass(FinalMeta, TestCase)): @final def tearDown(self): - _take_out_the_trash() self._instance_teardown_stack.close() for attr in set(vars(self)) - self._pre_setup_attrs: delattr(self, attr)