MCPcopy Create free account
hub / github.com/etingof/apacheconfig / testIncludes

Method testIncludes

tests/unit/test_parser.py:140–157  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

138 )
139
140 def testIncludes(self):
141 text = """\
142include first.conf
143<<include second.conf>>
144"""
145 ApacheConfigLexer = make_lexer()
146 ApacheConfigParser = make_parser()
147
148 parser = ApacheConfigParser(
149 ApacheConfigLexer(), start='contents')
150
151 ast = parser.parse(text)
152 self.assertEqual(
153 ast, [
154 'contents', ['include', 'first.conf'],
155 ['include', 'second.conf']
156 ]
157 )
158
159 def testApacheIncludesDisabled(self):
160 text = """\

Callers

nothing calls this directly

Calls 3

make_lexerFunction · 0.90
make_parserFunction · 0.90
parseMethod · 0.45

Tested by

no test coverage detected