From 44a5a8c7dd5a80ff9b54d5c8982015418165be5c Mon Sep 17 00:00:00 2001 From: GLolol Date: Sun, 7 Dec 2014 13:57:13 -0800 Subject: [PATCH] PkgInfo: catch the correct TimeoutError in tests --- PkgInfo/test.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/PkgInfo/test.py b/PkgInfo/test.py index 2af0ab9..631a1c4 100644 --- a/PkgInfo/test.py +++ b/PkgInfo/test.py @@ -41,7 +41,7 @@ class PkgInfoTestCase(PluginTestCase): ' .*?') self.assertError('pkg afdsfsadf asfasfasf') self.assertRegexp('pkg sid afsadfasfsa', 'no such package', re.I) - except TimeoutError: + except test.TimeoutError: raise unittest.SkipTest("Connection timed out.") def testVlistCommandBasics(self): @@ -58,7 +58,7 @@ class PkgInfoTestCase(PluginTestCase): except AssertionError as e: if "HTTP Error 50" in str(e): # It's not our fault; the API is down. raise unittest.SkipTest("HTTP error 50x; the API's probably down again") - except TimeoutError: + except test.TimeoutError: raise unittest.SkipTest("Connection timed out.") def testArchaur(self): @@ -68,19 +68,19 @@ class PkgInfoTestCase(PluginTestCase): except AssertionError as e: if "HTTP Error 50" in str(e): # It's not our fault; the API is down. raise unittest.SkipTest("HTTP error 50x; the API's probably down again") - except TimeoutError: + except test.TimeoutError: raise unittest.SkipTest("Connection timed out.") def testMintPkg(self): try: self.assertNotError('mintpkg qiana cinnamon') - except TimeoutError: + except test.TimeoutError: raise unittest.SkipTest("Connection timed out.") def testPkgsearch(self): try: self.assertNotError('pkgsearch debian python') - except TimeoutError: + except test.TimeoutError: raise unittest.SkipTest("Connection timed out.") # vim:set shiftwidth=4 tabstop=4 expandtab textwidth=79: