-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathconftest.py
More file actions
48 lines (28 loc) · 985 Bytes
/
conftest.py
File metadata and controls
48 lines (28 loc) · 985 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
import logging
import pytest
import cql.lexer
import cql.parser
# ---------------------------------------------------------------------------
@pytest.fixture(scope="function")
def lexer():
"""CQLLexer"""
cqllexer = cql.lexer.CQLLexer()
cqllexer.build(debug=True, debuglog=logging.getLogger("CQLLexer"))
return cqllexer
@pytest.fixture(scope="function")
def parser11(lexer):
"""CQLParser 1.1"""
cqlparser = cql.parser.CQLParser11()
cqlparser.build(lexer) # , debug=True, debuglog=logging.getLogger("CQLParser"))
return cqlparser
@pytest.fixture(scope="function")
def parser12(lexer):
"""CQLParser 1.2"""
cqlparser = cql.parser.CQLParser12()
cqlparser.build(lexer) # , debug=True, debuglog=logging.getLogger("CQLParser"))
return cqlparser
@pytest.fixture(scope="function")
def parser(parser12):
"""CQLParser 1.2"""
return parser12
# ---------------------------------------------------------------------------