Author chris.jerdonek
Recipients anton.barkovsky, chris.jerdonek, georg.brandl, r.david.murray
Date 2012-08-12.16:30:19
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
It still seems like things could be made more DRY.  Also, the pattern of having assert_unix_browser() execute various function blocks depending on whether various arguments are not None doesn't seem as clean or scalable as it should be (e.g. if the number of assert statements were to grow).

What about defining helper methods like check_open(), check_open_new_tab(), and check_open_new(), and then having the various test_<browser>() methods call each of them as appropriate?  For example--

+        browser.open_new('')
+        args = popen.cmd_line
+        self.assertEqual(args, ['test', '-raise', '-remote',
+            'openURL(,new-window)'])

could become a call to check_open_new().  The helper methods could default to the most common string arguments so that you will only need to define and pass the string arguments when the browser uses strings that are different from the defaults.
Date User Action Args
2012-08-12 16:30:20chris.jerdoneksetrecipients: + chris.jerdonek, georg.brandl, r.david.murray, anton.barkovsky
2012-08-12 16:30:19chris.jerdoneksetmessageid: <>
2012-08-12 16:30:19chris.jerdoneklinkissue15557 messages
2012-08-12 16:30:19chris.jerdonekcreate