edgeql: Add test for a schema introspection bug.
@@ -2047,3 +2047,29 @@ class TestExpressions(tb.QueryTestCase):
''', [
[[1, 3], [2, 1], [3, 2]]
])
+
+ @unittest.expectedFailure
+ async def test_edgeql_expr_schema_01(self):
+ await self.assert_query_result(r'''
+ WITH MODULE schema
+ SELECT _ := (
+ SELECT ObjectType
+ FILTER ObjectType.name = 'test::User'
+ ).attributes {
+ name,
+ @value
+ }
+ ORDER BY _.name;
+ ''', [
+ [
+ {'name': 'stdattrs::description', '@value': None},
+ {'name': 'stdattrs::expr', '@value': None},
+ {'name': 'stdattrs::is_abstract', '@value': 'false'},
+ {'name': 'stdattrs::is_derived', '@value': 'false'},
+ {'name': 'stdattrs::is_final', '@value': 'false'},
+ {'name': 'stdattrs::is_virtual', '@value': 'false'},
+ {'name': 'stdattrs::name', '@value': 'test::User'},
+ {'name': 'stdattrs::title', '@value': None},
+ {'name': 'stdattrs::view_type', '@value': None},
+ ]
+ ])
