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

Method test_scaffolding

Lib/test/test_clinic.py:2718–2731  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

2716 self.assertNotIn("Py_UNUSED", parser_decl)
2717
2718 def test_scaffolding(self):
2719 # test repr on special values
2720 self.assertEqual(repr(unspecified), '<Unspecified>')
2721 self.assertEqual(repr(NULL), '<Null>')
2722
2723 # test that fail fails
2724 with support.captured_stdout() as stdout:
2725 errmsg = 'The igloos are melting'
2726 with self.assertRaisesRegex(ClinicError, errmsg) as cm:
2727 fail(errmsg, filename='clown.txt', line_number=69)
2728 exc = cm.exception
2729 self.assertEqual(exc.filename, 'clown.txt')
2730 self.assertEqual(exc.lineno, 69)
2731 self.assertEqual(stdout.getvalue(), "")
2732
2733 def test_non_ascii_character_in_docstring(self):
2734 block = """

Callers

nothing calls this directly

Calls 4

failFunction · 0.90
assertRaisesRegexMethod · 0.80
assertEqualMethod · 0.45
getvalueMethod · 0.45

Tested by

no test coverage detected