=== modified file 'README'
@@ -22,8 +22,8 @@
Before running any tests you need to install the following packages:
- testrepository
- - python-testtools >= 0.9.6
- (available at https://launchpad.net/~bzr/+archive/ppa)
+ - python-testtools >= 0.9.8
+ (available at https://launchpad.net/~linaro-maintainers/+archive/tools)
- python-debian >= 0.1.16ubuntu1
- python-argparse
- dpkg-dev
=== modified file 'linaro_image_tools/tests/test_pyflakes.py'
@@ -27,10 +27,6 @@
stdout=subprocess.PIPE,
stderr=subprocess.PIPE)
(stdout, stderr) = proc.communicate()
- stdout = stdout.splitlines()
- stdout.sort()
- expected = ["./linaro_image_tools/utils.py:31: redefinition of "
- "unused 'CommandNotFound' from line 29" ]
- self.assertEquals(expected, stdout)
+ self.assertEquals('', stdout)
self.assertEquals('', stderr)
=== modified file 'linaro_image_tools/utils.py'
@@ -25,13 +25,12 @@
import tempfile
import tarfile
-try:
- from CommandNotFound import CommandNotFound
-except ImportError:
- CommandNotFound = None
+from testtools import try_import
from linaro_image_tools import cmd_runner
+CommandNotFound = try_import('CommandNotFound.CommandNotFound')
+
def path_in_tarfile_exists(path, tar_file):
tarinfo = tarfile.open(tar_file, 'r:gz')