From 6081021a24de167b1ce22000c924383e86598fe6 Mon Sep 17 00:00:00 2001 From: Bastian Kleineidam Date: Fri, 1 Mar 2013 07:27:41 +0100 Subject: [PATCH] Fall back to non-locked tests on systems without interprocess locking permission (eg. Travis). --- tests/test_comics.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/test_comics.py b/tests/test_comics.py index 58cd14c16..fbc3bdf28 100644 --- a/tests/test_comics.py +++ b/tests/test_comics.py @@ -54,7 +54,11 @@ class _ComicTester(TestCase): scraperobj = self.scraperclass() # Limit number of connections to one host. host = get_host(scraperobj.url) - with get_lock(host): + try: + with get_lock(host): + self._test_comic(scraperobj) + except OSError: + # interprocess lock not supported self._test_comic(scraperobj) def _test_comic(self, scraperobj):