run-tests can't handle tests_require - part 2

Bug #1286347 reported by Chris Johnston
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ubuntu CI Engine
New
Undecided
Unassigned

Bug Description

Run tests should be able to handle a split between dependencies and test dependencies. In order to quickly fix Bug #1286331 I had to move the test dependencies to appear as regular dependencies for the CLI. We should be able to separate out the two type of dependencies. This is what is seen when running run-tests with the current cli setup:

== Testing ./juju-deployer/update.py --assert-pinned ....
  File "./run-tests", line 90, in load_regular_component_tests
    suite.addTests(load_component_tests(loader, c))
  File "./run-tests", line 62, in load_component_tests
    suite.addTests(sub_loader.loadTestsFromTree('.'))
  File "/home/chris/venv/local/lib/python2.7/site-packages/ucitests-0.1.2-py2.7.egg/ucitests/loaders.py", line 145, in loadTestsFromTree
    suite.addTests(self.loadTestsFromFiles(dir_path, names))
  File "/home/chris/venv/local/lib/python2.7/site-packages/ucitests-0.1.2-py2.7.egg/ucitests/loaders.py", line 207, in loadTestsFromFiles
    suite.addTests(self.loadTestsFromTree(rel_path))
  File "/home/chris/venv/local/lib/python2.7/site-packages/ucitests-0.1.2-py2.7.egg/ucitests/loaders.py", line 140, in loadTestsFromTree
    suite = self.loadTestsFromPackage(dir_path)
  File "/home/chris/venv/local/lib/python2.7/site-packages/ucitests-0.1.2-py2.7.egg/ucitests/loaders.py", line 181, in loadTestsFromPackage
    suite.addTests(self.loadTestsFromFiles(dir_path, file_names))
  File "/home/chris/venv/local/lib/python2.7/site-packages/ucitests-0.1.2-py2.7.egg/ucitests/loaders.py", line 204, in loadTestsFromFiles
    suite.addTests(self.loadTestsFromFile(rel_path))
  File "/home/chris/venv/local/lib/python2.7/site-packages/ucitests-0.1.2-py2.7.egg/ucitests/loaders.py", line 219, in loadTestsFromFile
    module = self.importFromPath(path)
  File "/home/chris/venv/local/lib/python2.7/site-packages/ucitests-0.1.2-py2.7.egg/ucitests/loaders.py", line 278, in importFromPath
    raise ImportError(msg)
ImportError: Failed to import tests.test_cli at ./tests/test_cli.py:
Traceback (most recent call last):
  File "/home/chris/venv/local/lib/python2.7/site-packages/ucitests-0.1.2-py2.7.egg/ucitests/loaders.py", line 274, in importFromPath
    return importlib.import_module(mod_name)
  File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
    __import__(name)
  File "cli/tests/test_cli.py", line 26, in <module>
    from testfixtures import LogCapture
ImportError: No module named testfixtures

Tags: airline
tags: added: airline
Evan (ev)
no longer affects: ubuntu-ci-services-itself
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.