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

Method testForceArray

tests/unit/test_loader.py:134–149  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

132 self.assertEqual(expect_text, text)
133
134 def testForceArray(self):
135 text = """\
136b = [1]
137"""
138 options = {
139 'forcearray': True
140 }
141 ApacheConfigLexer = make_lexer(**options)
142 ApacheConfigParser = make_parser(**options)
143
144 loader = ApacheConfigLoader(
145 ApacheConfigParser(ApacheConfigLexer()), **options)
146
147 config = loader.loads(text)
148
149 self.assertEqual(config, {'b': ['1']})
150
151 def testHereDocPreservesWhitespace(self):
152 text = """\

Callers

nothing calls this directly

Calls 4

loadsMethod · 0.95
make_lexerFunction · 0.90
make_parserFunction · 0.90
ApacheConfigLoaderClass · 0.90

Tested by

no test coverage detected