On 11/23/12 06:14 PM, Thejaswini wrote:
Thanks Tim for the info on assertEqualDiff().
I have updated both the testcases accordingly .
Webrev is @
https://cr.opensolaris.org/action/browse/pkg/tk241774/15744194-rev04/
That looks grand. On IM I'd chatted with Thejaswini to suggest that in
t_pkg_search.py there's no need to use all of the spaces in the
'expected' value at line 961, since we're space-reducing the output
anyway, as well as moving the class member at line 990 into the only
test method that actually uses it.
There's no need for another webrev, feel free to push once you've made
those changes and tested. Thanks for bearing with me.
cheers,
tim
Oracle
Thejaswini K
Revenue Product Engineering (RPE), Systems
Phone: +91 8066927709 | Mobile: +91 9663324594
ORACLE India | Off Langford Road | Bangalore | 560025
Green Oracle <http://www.oracle.com/commitment> Oracle is committed to
developing practices and products that help protect the environment
On 11/23/12 10:02, Tim Foster wrote:
On 11/23/12 04:53 PM, Thejaswini wrote:
I have made the necessary changes.
Thanks for that, the changes to add the XML comment look good.
The webrev is @
https://cr.opensolaris.org/action/browse/pkg/tk241774/15744194-rev03/webrev/
Let me know if I can push these changes.
Not yet - you're doing too much work when comparing the output, for
example:
961 outfile = os.path.join(self.test_root,
"res_temp_pub")
962 self.pkg("search -s %s example_path > %s" %
(self.rurl, outfile))
963 res_list = (open(outfile, "rb")).readlines()
964 self._check(set(res_list), self.res_remote_path)
would be better as:
self.pkg("search -s %s example_path")
actual = self.reduceSpaces(self.output)
self.assertEqualDiff(expected, actual)
Don't bother adding a new self._check(..) method to
TestSearchMultiPublisher, but unless you feel up to it, I also
wouldn't bother replacing the other preexisting uses of self._check()
elsewhere in t_pkg_search. It looks like they were in the codebase
before we got support for assertEqualDiff() so I'd be inclined to
leave them there.
New code ought to use assertEqualDiff() though, imho.
cheers,
tim
_______________________________________________
pkg-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss