Bug 1499367 - Improve assertion for profileNameToRemove in test_refresh_firefox.py. r=Gijs
authorHenrik Skupin <mail@hskupin.info>
Tue, 16 Oct 2018 14:40:46 +0000
changeset 499937 247936437060b0139fffbf827305c1e16c2df2cc
parent 499936 78b8e67c7e59ae3f3c0b7a309bfecedec60a5254
child 499938 56d027190d7ba66c1097f0d11c221b4a0b8ee4e7
push id1864
push userffxbld-merge
push dateMon, 03 Dec 2018 15:51:40 +0000
treeherdermozilla-release@f040763d99ad [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersGijs
bugs1499367
milestone64.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1499367 - Improve assertion for profileNameToRemove in test_refresh_firefox.py. r=Gijs assertIn(el, list) should be favored over assertTrue(el in list), which gives clear details about what is different. Differential Revision: https://phabricator.services.mozilla.com/D8857
browser/components/migration/tests/marionette/test_refresh_firefox.py
--- a/browser/components/migration/tests/marionette/test_refresh_firefox.py
+++ b/browser/components/migration/tests/marionette/test_refresh_firefox.py
@@ -572,18 +572,17 @@ class TestFirefoxRefresh(MarionetteTestC
           container.append(arguments[0]);
           return container.path;
         """, script_args=(profileLeafName,))  # NOQA: E501
 
         self.assertTrue(os.path.isdir(self.reset_profile_path),
                         "Reset profile path should be present")
         self.assertTrue(os.path.isdir(self.desktop_backup_path),
                         "Backup profile path should be present")
-        self.assertTrue(self.profileNameToRemove in self.reset_profile_path,
-                        "Reset profile path should contain profile name to remove")
+        self.assertIn(self.profileNameToRemove, self.reset_profile_path)
 
     def testReset(self):
         self.checkProfile()
 
         self.doReset()
 
         # Now check that we're doing OK...
         self.checkProfile(hasMigrated=True)