MCPcopy Index your code
hub / github.com/RustPython/RustPython / test_valid_indent

Method test_valid_indent

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

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 8

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

Tested by

no test coverage detected