~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_fifo_cache.py

(jameinel) Allow 'bzr serve' to interpret SIGHUP as a graceful shutdown.
 (bug #795025) (John A Meinel)

Show diffs side-by-side

added added

removed removed

Lines of Context:
12
12
#
13
13
# You should have received a copy of the GNU General Public License
14
14
# along with this program; if not, write to the Free Software
15
 
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 
15
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
16
16
 
17
17
"""Tests for the fifo_cache module."""
18
18
 
229
229
        c = fifo_cache.FIFOCache()
230
230
        c.add(1, 2, cleanup=logging_cleanup)
231
231
        del c
232
 
        # TODO: We currently don't support calling the cleanup() funcs during
233
 
        #       __del__. We might want to consider implementing this.
234
 
        self.expectFailure("we don't call cleanups during __del__",
235
 
                           self.assertEqual, [(1, 2)], log)
236
 
        self.assertEqual([(1, 2)], log)
 
232
        # As a matter of design, bzr does not (can not) count on anything
 
233
        # being run from Python __del__ methods, because they may not run for
 
234
        # a long time, and because in cPython merely having them defined
 
235
        # interferes with garbage collection.
 
236
        self.assertEqual([], log)
237
237
 
238
238
 
239
239
class TestFIFOSizeCache(tests.TestCase):