Skip to content

Commit

Permalink
tests: Mark GROUP tests as @not_implemented
Browse files Browse the repository at this point in the history
  • Loading branch information
1st1 committed Dec 6, 2018
1 parent 897311f commit 5eb6e8f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 40 deletions.
10 changes: 8 additions & 2 deletions edb/tools/test/runner.py
Expand Up @@ -543,8 +543,14 @@ def addSkip(self, test, reason):

def addExpectedFailure(self, test, err):
method = getattr(test, test._testMethodName)
reason = getattr(method, '__et_xfail_reason__', None)
not_impl = getattr(method, '__et_xfail_not_implemented__', False)
try:
reason = method.__et_xfail_reason__
not_impl = getattr(method, '__et_xfail_not_implemented__', False)
except AttributeError:
# Maybe the whole test case class is decorated?
reason = getattr(test, '__et_xfail_reason__', None)
not_impl = getattr(test, '__et_xfail_not_implemented__', False)

marker = Markers.not_implemented if not_impl else Markers.xfailed
if not_impl:
self.notImplemented.append(
Expand Down
40 changes: 2 additions & 38 deletions tests/test_edgeql_group.py
Expand Up @@ -18,11 +18,12 @@


import os.path
import unittest # NOQA

from edb.server import _testbase as tb
from edb.tools import test


@test.not_implemented('GROUP statement is not yet implemented')
class TestEdgeQLGroup(tb.QueryTestCase):
'''These tests are focused on using GROUP statement.'''

Expand All @@ -35,7 +36,6 @@ class TestEdgeQLGroup(tb.QueryTestCase):
SETUP = os.path.join(os.path.dirname(__file__), 'schemas',
'groups_setup.eql')

@unittest.expectedFailure
async def test_edgeql_group_simple_01(self):
await self.assert_query_result(r'''
WITH MODULE test
Expand All @@ -48,7 +48,6 @@ async def test_edgeql_group_simple_01(self):
{4, 2},
])

@unittest.expectedFailure
async def test_edgeql_group_simple_02(self):
await self.assert_query_result(r'''
WITH MODULE test
Expand All @@ -63,7 +62,6 @@ async def test_edgeql_group_simple_02(self):
{3, 1},
])

@unittest.expectedFailure
async def test_edgeql_group_simple_03(self):
await self.assert_query_result(r'''
WITH MODULE test
Expand All @@ -77,7 +75,6 @@ async def test_edgeql_group_simple_03(self):
{3, 1},
])

@unittest.expectedFailure
async def test_edgeql_group_simple_04(self):
await self.assert_query_result(r'''
WITH MODULE test
Expand All @@ -92,7 +89,6 @@ async def test_edgeql_group_simple_04(self):
{3, 1},
])

@unittest.expectedFailure
async def test_edgeql_group_simple_05(self):
await self.assert_query_result(r'''
WITH MODULE test
Expand All @@ -107,7 +103,6 @@ async def test_edgeql_group_simple_05(self):
{2, 1},
])

@unittest.expectedFailure
async def test_edgeql_group_simple_06(self):
await self.assert_query_result(r'''
WITH MODULE test
Expand All @@ -122,7 +117,6 @@ async def test_edgeql_group_simple_06(self):
{2, 1},
])

@unittest.expectedFailure
async def test_edgeql_group_by_01(self):
await self.assert_query_result(r"""
WITH MODULE test
Expand All @@ -144,7 +138,6 @@ async def test_edgeql_group_by_01(self):
}],
])

@unittest.expectedFailure
async def test_edgeql_group_by_02(self):
await self.assert_query_result(r"""
WITH MODULE test
Expand All @@ -167,7 +160,6 @@ async def test_edgeql_group_by_02(self):
}],
])

@unittest.expectedFailure
async def test_edgeql_group_result_alias_01(self):
await self.assert_query_result(r'''
# re-use the same "_" alias in nested scope
Expand Down Expand Up @@ -197,7 +189,6 @@ async def test_edgeql_group_result_alias_01(self):
[{'count': 1, 'te': [True]}, {'count': 3, 'te': []}],
])

@unittest.expectedFailure
async def test_edgeql_group_result_alias_02(self):
await self.assert_query_result(r'''
# re-use the same "_" alias in nested scope
Expand All @@ -217,7 +208,6 @@ async def test_edgeql_group_result_alias_02(self):
[{'count': 1, 'te': [True]}, {'count': 3, 'te': []}],
])

@unittest.expectedFailure
async def test_edgeql_group_nested_01(self):
await self.assert_query_result(r"""
WITH MODULE test
Expand Down Expand Up @@ -263,7 +253,6 @@ async def test_edgeql_group_nested_01(self):
},
]])

@unittest.expectedFailure
async def test_edgeql_group_returning_01(self):
await self.assert_query_result(r'''
WITH MODULE test
Expand All @@ -279,7 +268,6 @@ async def test_edgeql_group_returning_01(self):
[42, 42],
])

@unittest.expectedFailure
async def test_edgeql_group_returning_02(self):
await self.assert_query_result(r'''
WITH MODULE test
Expand All @@ -295,7 +283,6 @@ async def test_edgeql_group_returning_02(self):
[1, 3, 42, 42],
])

@unittest.expectedFailure
async def test_edgeql_group_returning_03(self):
await self.assert_query_result(r'''
WITH MODULE test
Expand All @@ -321,7 +308,6 @@ async def test_edgeql_group_returning_03(self):
}],
])

@unittest.expectedFailure
async def test_edgeql_group_returning_04(self):
await self.assert_query_result(r'''
WITH MODULE test
Expand Down Expand Up @@ -353,7 +339,6 @@ async def test_edgeql_group_returning_04(self):
}],
])

@unittest.expectedFailure
async def test_edgeql_group_returning_05(self):
await self.assert_query_result(r'''
# a trivial group that is actually not doing anything
Expand All @@ -380,7 +365,6 @@ async def test_edgeql_group_returning_05(self):
],
])

@unittest.expectedFailure
async def test_edgeql_group_returning_06(self):
await self.assert_query_result(r'''
# a trivial group that is actually not doing anything
Expand All @@ -407,7 +391,6 @@ async def test_edgeql_group_returning_06(self):
],
])

@unittest.expectedFailure
async def test_edgeql_group_returning_07(self):
await self.assert_query_result(r'''
# Nominate a leader in each group from among the group.
Expand Down Expand Up @@ -496,7 +479,6 @@ async def test_edgeql_group_returning_07(self):
]
])

@unittest.expectedFailure
async def test_edgeql_group_returning_08(self):
await self.assert_query_result(r'''
# Nominate a leader in each group from among the group.
Expand Down Expand Up @@ -581,7 +563,6 @@ async def test_edgeql_group_returning_08(self):
]
])

@unittest.expectedFailure
async def test_edgeql_group_returning_09(self):
await self.assert_query_result(r'''
# Nominate a leader in each group from among the group.
Expand Down Expand Up @@ -664,7 +645,6 @@ async def test_edgeql_group_returning_09(self):
]
])

@unittest.expectedFailure
async def test_edgeql_group_by_tuple_01(self):
await self.assert_query_result(r"""
WITH MODULE test
Expand Down Expand Up @@ -692,7 +672,6 @@ async def test_edgeql_group_by_tuple_01(self):
}],
])

@unittest.expectedFailure
async def test_edgeql_group_by_multiple_01(self):
await self.assert_query_result(r"""
WITH MODULE test
Expand Down Expand Up @@ -724,7 +703,6 @@ async def test_edgeql_group_by_multiple_01(self):
}],
])

@unittest.expectedFailure
async def test_edgeql_group_by_multiple_02(self):
await self.assert_query_result(r"""
WITH MODULE test
Expand Down Expand Up @@ -752,7 +730,6 @@ async def test_edgeql_group_by_multiple_02(self):
}],
])

@unittest.expectedFailure
async def test_edgeql_group_by_multiple_03(self):
await self.assert_query_result(r"""
WITH MODULE test
Expand Down Expand Up @@ -785,7 +762,6 @@ async def test_edgeql_group_by_multiple_03(self):
}],
])

@unittest.expectedFailure
async def test_edgeql_group_by_multiple_04(self):
await self.assert_query_result(r"""
WITH MODULE test
Expand Down Expand Up @@ -823,7 +799,6 @@ async def test_edgeql_group_by_multiple_04(self):
}],
])

@unittest.expectedFailure
async def test_edgeql_group_by_multiple_05(self):
await self.assert_query_result(r"""
WITH MODULE test
Expand Down Expand Up @@ -862,7 +837,6 @@ async def test_edgeql_group_by_multiple_05(self):
}],
])

@unittest.expectedFailure
async def test_edgeql_group_by_multiple_06(self):
await self.assert_query_result(r"""
WITH MODULE test
Expand Down Expand Up @@ -900,7 +874,6 @@ async def test_edgeql_group_by_multiple_06(self):
}],
])

@unittest.expectedFailure
async def test_edgeql_group_by_multiple_07(self):
await self.assert_query_result(r"""
WITH MODULE cards
Expand All @@ -923,7 +896,6 @@ async def test_edgeql_group_by_multiple_07(self):
[['Dragon'], 11]
])

@unittest.expectedFailure
async def test_edgeql_group_linkproperty_simple_01(self):
await self.assert_query_result(r"""
# group by link property
Expand Down Expand Up @@ -960,7 +932,6 @@ async def test_edgeql_group_linkproperty_simple_01(self):
],
])

@unittest.expectedFailure
async def test_edgeql_group_linkproperty_simple_02(self):
await self.assert_query_result(r"""
# use link property inside a group aggregate
Expand Down Expand Up @@ -1003,7 +974,6 @@ async def test_edgeql_group_linkproperty_simple_02(self):

])

@unittest.expectedFailure
async def test_edgeql_group_linkproperty_simple_03(self):
await self.assert_query_result(r"""
# group by link property
Expand All @@ -1030,7 +1000,6 @@ async def test_edgeql_group_linkproperty_simple_03(self):
]
])

@unittest.expectedFailure
async def test_edgeql_group_linkproperty_nested_01(self):
await self.assert_query_result(r"""
WITH MODULE cards
Expand Down Expand Up @@ -1101,10 +1070,6 @@ async def test_edgeql_group_linkproperty_nested_01(self):
]
])

# XXX: once GROUP is working we'll need some test for a GROUP
# nested inside a GROUP

@unittest.expectedFailure
async def test_edgeql_group_linkproperty_multiple_01(self):
await self.assert_query_result(r"""
WITH
Expand Down Expand Up @@ -1159,7 +1124,6 @@ async def test_edgeql_group_linkproperty_multiple_01(self):
]
])

@unittest.expectedFailure
async def test_edgeql_group_scalar_01(self):
await self.assert_query_result(r"""
WITH
Expand Down

0 comments on commit 5eb6e8f

Please sign in to comment.