[test] cleanup a bit
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Thu, 01 Dec 2016 23:18:11 +0100
changeset 810 38ca753c8491
parent 809 3f6fd47874d8
child 811 0736f99993c4
[test] cleanup a bit
test/unittest_stcheck.py
--- a/test/unittest_stcheck.py	Thu Dec 01 23:14:53 2016 +0100
+++ b/test/unittest_stcheck.py	Thu Dec 01 23:18:11 2016 +0100
@@ -31,9 +31,6 @@
 BAD_QUERIES = (
     'Any X, Y GROUPBY X',
 
-    # this is now a valid query
-    #'DISTINCT Any X WHERE X work_for Y ORDERBY Y',
-
     'Any X WHERE X name Person',
 
     'Any X WHERE X name nofunction(Y)',
@@ -48,9 +45,8 @@
 
     'Any UPPER(Y) WHERE X name "toto"',
 
-    'Any C ORDERBY N where C located P, P eid %(x)s', #15066
+    'Any C ORDERBY N where C located P, P eid %(x)s',
 
-#    'Any COUNT(X),P WHERE X concerns P', #9726
     'Any X, MAX(COUNT(B)) GROUPBY X WHERE B concerns X;',
 
     '(Any X WHERE X nom "toto") UNION (Any X,F WHERE X firstname F);',
@@ -70,8 +66,7 @@
     # cant sort on XN, there may be different PF values for the same PF value
     'DISTINCT Any PF ORDERBY X WHERE P work_for X, P firstname PF',
     'DISTINCT Any PF ORDERBY XN WHERE P work_for X, P firstname PF, X name XN',
-
-    )
+)
 
 OK_QUERIES = (
     '(Any N,COUNT(X) GROUPBY N WHERE X name N)'
@@ -89,7 +84,7 @@
     'Any X WHERE X eid 1, X eid < 42',
     'Any X WHERE X number CAST(Int, Y), X name Y',
     'SET X number CAST(Int, Y) WHERE X name Y',
-    )
+)
 
 
 class CheckClassTest(unittest.TestCase):
@@ -214,13 +209,6 @@
         self.assertEqual(rqlst.children[0].aggregated, set(('VC',)))
 
 
-##     def test_rewriten_as_string(self):
-##         rqlst = self.parse('Any X WHERE X eid 12')
-##         self.assertEqual(rqlst.as_string(), 'Any X WHERE X eid 12')
-##         rqlst = rqlst.copy()
-##         self.annotate(rqlst)
-##         self.assertEqual(rqlst.as_string(), 'Any X WHERE X eid 12')
-
 class CopyTest(unittest.TestCase):
 
     def setUp(self):
@@ -261,11 +249,6 @@
         helper = RQLHelper(DummySchema(), None, {'eid': 'uid'})
         self.parse = helper.parse
 
-#     def test_simplified(self):
-#         rqlst = self.parse('Any L WHERE 5 name L')
-#         self.annotate(rqlst)
-#         self.assertTrue(rqlst.defined_vars['L'].stinfo['attrvar'])
-
     def test_is_rel_no_scope_1(self):
         """is relation used as type restriction should not affect variable's
         scope, and should not be included in stinfo['relations']