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

Method test_compact

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

Source from the content-addressed store, hash-verified

207
208 @force_not_colorized
209 def test_compact(self):
210 input_ = '[ 1 ,\n 2]'
211 expect = '[1,2]\n'
212 args = sys.executable, '-m', self.module, '--compact'
213 process = subprocess.run(args, input=input_, capture_output=True, text=True, check=True)
214 self.assertEqual(process.stdout, expect)
215 self.assertEqual(process.stderr, '')
216
217 def test_no_ensure_ascii_flag(self):
218 infile = self._create_infile('{"key":"💩"}')

Callers

nothing calls this directly

Calls 2

runMethod · 0.45
assertEqualMethod · 0.45

Tested by

no test coverage detected