[Commits] (twl) Remove unnecessary unicode literals
commits at osafoundation.org
commits at osafoundation.org
Thu Sep 2 17:43:04 PDT 2004
Commit by: twl
Modified files:
chandler/repository/query/tests/TestCompoundQueries.py 1.6 1.7
chandler/repository/query/tests/TestSimpleQueries.py 1.10 1.11
Log message:
Remove unnecessary unicode literals
ViewCVS links:
http://cvs.osafoundation.org/index.cgi/chandler/repository/query/tests/TestCompoundQueries.py.diff?r1=text&tr1=1.6&r2=text&tr2=1.7
http://cvs.osafoundation.org/index.cgi/chandler/repository/query/tests/TestSimpleQueries.py.diff?r1=text&tr1=1.10&r2=text&tr2=1.11
Index: chandler/repository/query/tests/TestSimpleQueries.py
diff -u chandler/repository/query/tests/TestSimpleQueries.py:1.10 chandler/repository/query/tests/TestSimpleQueries.py:1.11
--- chandler/repository/query/tests/TestSimpleQueries.py:1.10 Thu Sep 2 16:05:29 2004
+++ chandler/repository/query/tests/TestSimpleQueries.py Thu Sep 2 17:43:03 2004
@@ -1,6 +1,6 @@
-__revision__ = "$Revision: 1.10 $"
-__date__ = "$Date: 2004/09/02 23:05:29 $"
+__revision__ = "$Revision: 1.11 $"
+__date__ = "$Date: 2004/09/03 00:43:03 $"
__copyright__ = "Copyright (c) 2004 Open Source Applications Foundation"
__license__ = "http://osafoundation.org/Chandler_0.1_license_terms.htm"
@@ -28,53 +28,53 @@
def testKindQuery(self):
""" Test a simulation of kindQuery """
- results = self._executeQuery(u'for i in "//Schema/Core/Kind" where True')
+ results = self._executeQuery('for i in "//Schema/Core/Kind" where True')
self._checkQuery(lambda i: False, results)
def testFunctionKindQuery(self):
""" Test calling a function in the query predicate """
- results = self._executeQuery(u'for i in "//Schema/Core/Kind" where contains(i.itsName,"arc")')
+ results = self._executeQuery('for i in "//Schema/Core/Kind" where contains(i.itsName,"arc")')
self._checkQuery(lambda i: not 'arc' in i.itsName, results)
def testVariableQuery(self):
""" Test query where source is specified in a variable """
k = self.rep.findPath('//Schema/Core/Kind')
- results = self._executeQuery(u'for i in $1 where contains(i.itsName,"arc")', [k])
+ results = self._executeQuery('for i in $1 where contains(i.itsName,"arc")', [k])
self._checkQuery(lambda i: not 'arc' in i.itsName, results)
def testNotFunctionKindQuery(self):
""" Test negating a function call in the query predicate """
- results = self._executeQuery(u'for i in "//Schema/Core/Kind" where not contains(i.itsName,"arc")')
+ results = self._executeQuery('for i in "//Schema/Core/Kind" where not contains(i.itsName,"arc")')
self._checkQuery(lambda i: 'arc' in i.itsName, results)
def testEqualityKindQuery(self):
""" Test equality operator in the query predicate """
- results = self._executeQuery(u'for i in "//Schema/Core/Kind" where i.itsName == "Item"')
+ results = self._executeQuery('for i in "//Schema/Core/Kind" where i.itsName == "Item"')
self._checkQuery(lambda i: not i.itsName == 'Item', results)
def testInequalityKindQuery(self):
""" Test inequality operator in the query predicate """
- results = self._executeQuery(u'for i in "//Schema/Core/Kind" where i.itsName != "Item"')
+ results = self._executeQuery('for i in "//Schema/Core/Kind" where i.itsName != "Item"')
self._checkQuery(lambda i: not i.itsName != 'Item', results)
def testLengthKindQuery(self):
""" Test calling a unary function in the query predicate """
- results = self._executeQuery(u'for i in "//Schema/Core/Kind" where len(i.attributes) >= 4')
+ results = self._executeQuery('for i in "//Schema/Core/Kind" where len(i.attributes) >= 4')
self._checkQuery(lambda i: not len(i.attributes) >= 4, results)
def testAndKindQuery(self):
""" Test AND operator in the query predicate """
- results = self._executeQuery(u'for i in "//Schema/Core/Kind" where contains(i.itsName,"arc") and len(i.attributes) >= 4')
+ results = self._executeQuery('for i in "//Schema/Core/Kind" where contains(i.itsName,"arc") and len(i.attributes) >= 4')
self._checkQuery(lambda i: not ("arc" in i.itsName and len(i.attributes) >= 4), results)
def testNotAndKindQuery(self):
""" Test AND NOT operation in the query predicate """
- results = self._executeQuery(u'for i in "//Schema/Core/Kind" where contains(i.itsName,"arc") and not len(i.attributes) >= 4')
+ results = self._executeQuery('for i in "//Schema/Core/Kind" where contains(i.itsName,"arc") and not len(i.attributes) >= 4')
self._checkQuery(lambda i: not ('arc' in i.itsName and not len(i.attributes) >= 4), results)
def testMethodCallQuery(self):
""" """
- results = self._executeQuery(u'for i in "//Schema/Core/Kind" where i.hasAttributeValue("superKinds")')
+ results = self._executeQuery('for i in "//Schema/Core/Kind" where i.hasAttributeValue("superKinds")')
self._checkQuery(lambda i: not i.hasAttributeValue("superKinds"), results)
def testItemTraversalQuery(self):
@@ -137,7 +137,7 @@
def testWhereVariableQuery(self):
""" Test using a variable in the where clause """
- queryString= u'for i in "//Schema/Core/Kind" where contains(i.itsName,$0)'
+ queryString= 'for i in "//Schema/Core/Kind" where contains(i.itsName,$0)'
import repository.query.Query as Query
q = Query.Query(self.rep, queryString)
pattern = 'arc'
Index: chandler/repository/query/tests/TestCompoundQueries.py
diff -u chandler/repository/query/tests/TestCompoundQueries.py:1.6 chandler/repository/query/tests/TestCompoundQueries.py:1.7
--- chandler/repository/query/tests/TestCompoundQueries.py:1.6 Wed Sep 1 15:38:10 2004
+++ chandler/repository/query/tests/TestCompoundQueries.py Thu Sep 2 17:43:03 2004
@@ -1,6 +1,6 @@
-__revision__ = "$Revision: 1.6 $"
-__date__ = "$Date: 2004/09/01 22:38:10 $"
+__revision__ = "$Revision: 1.7 $"
+__date__ = "$Date: 2004/09/03 00:43:03 $"
__copyright__ = "Copyright (c) 2004 Open Source Applications Foundation"
__license__ = "http://osafoundation.org/Chandler_0.1_license_terms.htm"
@@ -11,13 +11,13 @@
def testDifferenceQuery(self):
""" Test a difference query """
- results = self._executeQuery(u"difference(for i in '//Schema/Core/Kind' where contains(i.itsName,'o'),for i in '//Schema/Core/Kind' where contains(i.itsName,'t'))")
+ results = self._executeQuery("difference(for i in '//Schema/Core/Kind' where contains(i.itsName,'o'),for i in '//Schema/Core/Kind' where contains(i.itsName,'t'))")
#@@@ TODO better result check
# self._checkQuery(lambda i: not i.hasAttributeValue("superKinds"), results)
def testIntersectQuery(self):
""" Test an intersection query """
- results = self._executeQuery(u"intersect(for i in '//Schema/Core/Kind' where contains(i.itsName,'o'),for i in '//Schema/Core/Kind' where contains(i.itsName,'t'))")
+ results = self._executeQuery("intersect(for i in '//Schema/Core/Kind' where contains(i.itsName,'o'),for i in '//Schema/Core/Kind' where contains(i.itsName,'t'))")
#@@@ TODO better result check
# self._checkQuery(lambda i: not i.hasAttributeValue("superKinds"), results)
More information about the Commits
mailing list