MCPcopy Index your code
hub / github.com/python/cpython / test_indent

Method test_indent

Lib/test/test_json/test_tool.py:177–188  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

175
176 @force_not_colorized
177 def test_indent(self):
178 input_ = '[1, 2]'
179 expect = textwrap.dedent('''\
180 [
181 1,
182 2
183 ]
184 ''')
185 args = sys.executable, '-m', self.module, '--indent', '2'
186 process = subprocess.run(args, input=input_, capture_output=True, text=True, check=True)
187 self.assertEqual(process.stdout, expect)
188 self.assertEqual(process.stderr, '')
189
190 @force_not_colorized
191 def test_no_indent(self):

Callers

nothing calls this directly

Calls 3

dedentMethod · 0.45
runMethod · 0.45
assertEqualMethod · 0.45

Tested by

no test coverage detected