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

Method test_valid_indent

Lib/test/test_reprlib.py:276–587  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

274 r(z)
275
276 def test_valid_indent(self):
277 test_cases = [
278 {
279 'object': (),
280 'tests': (
281 (dict(indent=None), '()'),
282 (dict(indent=False), '()'),
283 (dict(indent=True), '()'),
284 (dict(indent=0), '()'),
285 (dict(indent=1), '()'),
286 (dict(indent=4), '()'),
287 (dict(indent=4, maxlevel=2), '()'),
288 (dict(indent=''), '()'),
289 (dict(indent='-->'), '()'),
290 (dict(indent='....'), '()'),
291 ),
292 },
293 {
294 'object': '',
295 'tests': (
296 (dict(indent=None), "''"),
297 (dict(indent=False), "''"),
298 (dict(indent=True), "''"),
299 (dict(indent=0), "''"),
300 (dict(indent=1), "''"),
301 (dict(indent=4), "''"),
302 (dict(indent=4, maxlevel=2), "''"),
303 (dict(indent=''), "''"),
304 (dict(indent='-->'), "''"),
305 (dict(indent='....'), "''"),
306 ),
307 },
308 {
309 'object': [1, 'spam', {'eggs': True, 'ham': []}],
310 'tests': (
311 (dict(indent=None), '''\
312 [1, 'spam', {'eggs': True, 'ham': []}]'''),
313 (dict(indent=False), '''\
314 [
315 1,
316 'spam',
317 {
318 'eggs': True,
319 'ham': [],
320 },
321 ]'''),
322 (dict(indent=True), '''\
323 [
324 1,
325 'spam',
326 {
327 'eggs': True,
328 'ham': [],
329 },
330 ]'''),
331 (dict(indent=0), '''\
332 [
333 1,

Callers

nothing calls this directly

Calls 7

reprMethod · 0.95
ReprClass · 0.90
setFunction · 0.85
subTestMethod · 0.45
itemsMethod · 0.45
dedentMethod · 0.45
assertEqualMethod · 0.45

Tested by

no test coverage detected