deflake, remove morituri hack, more error handling

This commit is contained in:
Samantha Baldwin
2017-09-04 21:55:05 -04:00
parent 007dc0729e
commit 83729ef7f3
10 changed files with 27 additions and 30 deletions

View File

@@ -29,6 +29,7 @@ class TestAccurateRipResponse(TestCase):
def setUp(self):
self.cache_dir = mkdtemp(suffix='whipper_accurip_cache_test')
accurip._CACHE_DIR = self.cache_dir
def cleanup(cachedir):
chmod(cachedir, 0755)
rmtree(cachedir)
@@ -83,9 +84,9 @@ class TestAccurateRipResponse(TestCase):
# XXX: test arc.py
class TestCalculateChecksums(TestCase):
def test_returns_none_for_bad_files(self):
paths = ['/does/not/exist']
self.assertEquals(
calculate_checksums(['/does/not/exist']),
{'v1': [None], 'v2': [None]}
@@ -93,6 +94,7 @@ class TestCalculateChecksums(TestCase):
# TODO: test success when file exists
class TestVerifyResult(TestCase):
@classmethod
def setUpClass(cls):
@@ -221,6 +223,7 @@ class TestVerifyResult(TestCase):
'DBMaxConfidenceCRC': '9cc1f32e',
})
class TestAccurateRipReport(TestCase):
def setUp(self):
sys.stdout = StringIO()

View File

@@ -2,13 +2,9 @@
# vi:si:et:sw=4:sts=4:ts=4
import os
import pickle
import unittest
from whipper.result import result
from whipper.common import program, accurip, mbngs, config
from whipper.common import program, mbngs, config
from whipper.command.cd import DEFAULT_DISC_TEMPLATE