Code Duplication    Length = 20-21 lines in 2 locations

tests/test_cli.py 2 locations

@@ 431-451 (lines=21) @@
428
    assert context_log not in result.output
429
430
431
@pytest.mark.usefixtures('remove_fake_project_dir')
432
def test_debug_file_verbose(cli_runner, debug_file):
433
    assert not debug_file.exists()
434
435
    result = cli_runner(
436
        '--verbose',
437
        '--no-input',
438
        '--debug-file',
439
        str(debug_file),
440
        'tests/fake-repo-pre/',
441
    )
442
    assert result.exit_code == 0
443
444
    assert debug_file.exists()
445
446
    context_log = (
447
        "DEBUG cookiecutter.main: context_file is "
448
        "tests/fake-repo-pre/cookiecutter.json"
449
    )
450
    assert context_log in debug_file.readlines(cr=False)
451
    assert context_log in result.output
452
453
454
@pytest.mark.usefixtures('remove_fake_project_dir')
@@ 409-428 (lines=20) @@
406
    return tmpdir / 'fake-repo.log'
407
408
409
@pytest.mark.usefixtures('remove_fake_project_dir')
410
def test_debug_file_non_verbose(cli_runner, debug_file):
411
    assert not debug_file.exists()
412
413
    result = cli_runner(
414
        '--no-input',
415
        '--debug-file',
416
        str(debug_file),
417
        'tests/fake-repo-pre/',
418
    )
419
    assert result.exit_code == 0
420
421
    assert debug_file.exists()
422
423
    context_log = (
424
        "DEBUG cookiecutter.main: context_file is "
425
        "tests/fake-repo-pre/cookiecutter.json"
426
    )
427
    assert context_log in debug_file.readlines(cr=False)
428
    assert context_log not in result.output
429
430
431
@pytest.mark.usefixtures('remove_fake_project_dir')