diff options
author | Elliot Smith <elliot.smith@intel.com> | 2016-07-15 12:09:57 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-08-11 00:09:27 +0100 |
commit | 6172fb1923a34b9ba286debcb89653a347c0f5e0 (patch) | |
tree | 7ed723ae11c80da074b6b85f07895553dcb41b89 /bitbake | |
parent | cf0b07c96f3f02f867fcb2e340cff94f950b44e9 (diff) | |
download | poky-6172fb1923a34b9ba286debcb89653a347c0f5e0.tar.gz |
bitbake: toaster-tests: fix erroneous message when test fails
When one of the layer details tests fails (as it occasionally
does, if running on a machine under heavy load, due to sync issues),
the error message shown is misleading, as it is something like:
"Expected 'This was imported' in ['This was imported', ...]"
The string 'This was imported' is in the list shown in the message,
but the message suggests it isn't.
This is because the test compares the string with one list, but
then uses a different list in the fail message if the comparison
fails.
Fix the list shown in the message about the test failing.
(Bitbake rev: 34943b2278efe99c6744399e04a47cdda630468e)
Signed-off-by: Elliot Smith <elliot.smith@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rw-r--r-- | bitbake/lib/toaster/tests/browser/test_layerdetails_page.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/bitbake/lib/toaster/tests/browser/test_layerdetails_page.py b/bitbake/lib/toaster/tests/browser/test_layerdetails_page.py index 0005192b15..2fa9672673 100644 --- a/bitbake/lib/toaster/tests/browser/test_layerdetails_page.py +++ b/bitbake/lib/toaster/tests/browser/test_layerdetails_page.py | |||
@@ -113,8 +113,8 @@ class TestLayerDetailsPage(SeleniumTestCase): | |||
113 | new_values = ["%s-edited" % old_val | 113 | new_values = ["%s-edited" % old_val |
114 | for old_val in self.initial_values] | 114 | for old_val in self.initial_values] |
115 | 115 | ||
116 | for inputs in self.find_all("dd input[type=text]") + \ | 116 | for inputs in self.find_all('dd input[type="text"]') + \ |
117 | self.find_all("dd textarea"): | 117 | self.find_all('dd textarea'): |
118 | # ignore the tt inputs (twitter typeahead input) | 118 | # ignore the tt inputs (twitter typeahead input) |
119 | if "tt-" in inputs.get_attribute("class"): | 119 | if "tt-" in inputs.get_attribute("class"): |
120 | continue | 120 | continue |
@@ -122,8 +122,8 @@ class TestLayerDetailsPage(SeleniumTestCase): | |||
122 | value = inputs.get_attribute("value") | 122 | value = inputs.get_attribute("value") |
123 | 123 | ||
124 | self.assertTrue(value in new_values, | 124 | self.assertTrue(value in new_values, |
125 | "Expecting any of \"%s\"but got \"%s\"" % | 125 | "Expecting any of \"%s\" but got \"%s\"" % |
126 | (self.initial_values, value)) | 126 | (new_values, value)) |
127 | 127 | ||
128 | def test_delete_layer(self): | 128 | def test_delete_layer(self): |
129 | """ Delete the layer """ | 129 | """ Delete the layer """ |