Make with_lightdm_mock decorator more strict about trying to patch for non-existant mocks.
commitd341616bb648cbe118a71915b214df978c3b4828
authorThomi Richards <thomi.richards@canonical.com>
dateMon 15 Jul 2013, 12:23 (13 years ago)
parent4bd2c55
tests/autopilot/unity8/shell/tests/helpers.py+4
@@ -30,6 +30,10 @@ def with_lightdm_mock(mock_type):
3030 "qml/mocks/LightDM/",
3131 mock_type
3232 )
33+ if not os.path.exists(new_ld_library_path):
34+ raise RuntimeError(
35+ "LightDM mock '%s' does not exist." % mock_type
36+ )
3337
3438 logger.info("New library path: %s", new_ld_library_path)
3539 args[0].patch_environment('LD_LIBRARY_PATH', new_ld_library_path)