Hi there,

I've another tiny code review here, causing us to skip the test which requires the test machine to have a particular locale installed, rather than raising an error if the locale is not present.

Again, I'm inlining the change, but let me know if you anyone wants a full webrev. I've tested this on machines both with, and without the required locale, ensuring that the right thing happens.

# HG changeset patch
# User Tim Foster <tim.s.fos...@oracle.com>
# Date 1342579694 -43200
# Node ID 22ccaf4aff44d8e0c853612aebc0c9771035b879
# Parent  013b8ba5a1725b86876e5dc9e3d4341050c73759
7184834 test_help_character_encoding could use TestSkippedException

diff -r 013b8ba5a172 -r 22ccaf4aff44 src/tests/cli/t_pkg_help.py
--- a/src/tests/cli/t_pkg_help.py       Fri Jul 13 09:56:57 2012 -0700
+++ b/src/tests/cli/t_pkg_help.py       Wed Jul 18 14:48:14 2012 +1200
@@ -103,8 +103,10 @@
                     coverage=False)
                 line = " ".join(out.split())
                 m = re.search(r"ja_JP.eucJP", line)
-                self.assert_(m, "You must have ja_JP.eucJP"
-                    " locale installed for this test to succeed.")
+                if not m:
+                        raise pkg5unittest.TestSkippedException("The "
+                            "test system must have the ja_JP.eucJP locale "
+                            "installed to run this test.")

                 eucJP_encode_file = os.path.join(self.ro_data_root,
                     "pkg.help.eucJP.expected.out")

        cheers,
                        tim
_______________________________________________
pkg-discuss mailing list
pkg-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss

Reply via email to