From: Zooko O'Whielacronx Date: Mon, 1 Feb 2010 04:11:44 +0000 (-0800) Subject: tests: stop being surprised that Nevow no longer prints out warnings when it tries... X-Git-Url: https://git.rkrishnan.org/pf/content/something?a=commitdiff_plain;h=7d32fafc44f2589ad55a7fac49aba8d1c9073149;p=tahoe-lafs%2Ftahoe-lafs.git tests: stop being surprised that Nevow no longer prints out warnings when it tries to find its static files Unless we are using a sufficiently new version of Nevow, in which case if it prints out warnings then this is a hard test failure. :-) --- diff --git a/src/allmydata/test/test_nevow.py b/src/allmydata/test/test_nevow.py index 99ad2b34..1b1656f8 100644 --- a/src/allmydata/test/test_nevow.py +++ b/src/allmydata/test/test_nevow.py @@ -7,5 +7,9 @@ class Web(unittest.TestCase): """ Sometimes Nevow can't find its resource files such as its default css file. """ + import pkg_resources + try: + pkg_resources.require("Nevow>=0.9.33") + except pkg_resources.VersionConflict: + raise unittest.SkipTest("We pass this test only with Nevow >= v0.9.33, which is the first version of Nevow that has our patch from http://www.divmod.org/trac/ticket/2527") webform.defaultCSS.openForReading() - test_read_default_css.todo = "This patch that we submitted to Nevow fixes this issue: http://www.divmod.org/trac/ticket/2527"