From 1f23d607251a82811aa97fc714d7b701082d0049 Mon Sep 17 00:00:00 2001 From: Cole Robinson Date: Sat, 27 Jan 2018 14:49:43 -0500 Subject: [PATCH] tests: urls: Tweak output and logging a bit --- tests/test_urls.py | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/tests/test_urls.py b/tests/test_urls.py index 87c0b27d8..74d386ab9 100644 --- a/tests/test_urls.py +++ b/tests/test_urls.py @@ -47,8 +47,6 @@ class _DistroURL(object): self.detectdistro = detectdistro self.arch = self._find_arch() self.distroclass = self._distroclass_for_name(self.name) - logging.debug("Testing for media arch=%s distroclass=%s", - self.arch, self.distroclass) self.testxen = testxen self.testbootiso = testbootiso @@ -133,12 +131,6 @@ def _testURL(fetcher, distroobj): Test that our URL detection logic works for grabbing kernel, xen kernel, and boot.iso """ - os.environ.pop("VIRTINST_TEST_SUITE", None) - - distname = distroobj.name - sys.stdout.write("\nTesting %-25s " % distname) - sys.stdout.flush() - arch = distroobj.arch hvmguest.os.arch = arch xenguest.os.arch = arch @@ -219,6 +211,15 @@ def _testURL(fetcher, distroobj): def _testURLWrapper(distroobj): + os.environ.pop("VIRTINST_TEST_SUITE", None) + + logging.debug("Testing for media arch=%s distroclass=%s", + distroobj.arch, distroobj.distroclass) + + distname = distroobj.name + sys.stdout.write("\nTesting %-25s " % distname) + sys.stdout.flush() + fetcher = urlfetcher.fetcherForURI(distroobj.url, "/tmp", meter) try: fetcher.prepareLocation()