changeset 5031:d0af0cf05fc2

Xapian2009: py version is checked using new MoinMoin.wikiutil.Version class.
author Dmitrijs Milajevs <dimazest@gmail.com>
date Sat, 22 Aug 2009 12:22:20 +0200
parents 7d01d6bbdcab
children 7e9b7149c95e
files MoinMoin/search/_tests/test_search.py
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/search/_tests/test_search.py	Sat Aug 22 11:09:08 2009 +0200
+++ b/MoinMoin/search/_tests/test_search.py	Sat Aug 22 12:22:20 2009 +0200
@@ -14,11 +14,13 @@
 from MoinMoin.search.queryparser import QueryParser
 from MoinMoin.search.builtin import MoinSearch, XapianSearch
 from MoinMoin._tests import nuke_xapian_index, wikiconfig, become_trusted, create_page, nuke_page
+from MoinMoin.wikiutil import Version
 
-if py.version != '1.0.0':
+PY_MIN_VERSION = '1.0.0'
+if Version(version=py.version) < Version(version=PY_MIN_VERSION):
     # There are some generative tests, which won't run on older versions!
     # XXX These tests should be refactored to be able to be run with older versions of py.
-    py.test.skip('Currently py version 1.0.0 is needed')
+    py.test.skip('Currently py version %s is needed' % PY_MIN_VERSION)
 
 
 class TestQueryParsing(object):