Example #1
0
def test_existing_gitignore_without():
    existing = ['# random comment', '# /.env']
    expected = [
        '# random comment', '# /.env', '/.env',
        '/.wa-cli/readonly_services.txt'
    ]
    assert cfg.update_gitignore_contents(existing)[:4] == expected[:4]
Example #2
0
def test_existing_gitignore_without_2():
    existing = [
        '# random comment',
        '# /.env',
        '#skills',
    ]
    expected = [
        '# random comment', '# /.env', '#skills', '/.env',
        '/.wa-cli/readonly_services.txt'
    ]
    updated = cfg.update_gitignore_contents(existing)
    assert updated[:len(expected)] == expected
    assert '/skills' not in updated
Example #3
0
def test_no_gitignore():
    existing = []
    expected = ['/.env', '/.wa-cli/readonly_services.txt']
    assert cfg.update_gitignore_contents(existing)[:2] == expected[:2]
Example #4
0
def test_no_gitignore():
    existing = []
    expected = ['/.env', '/.wa-cli/readonly_services.txt']
    updated = cfg.update_gitignore_contents(existing)
    assert updated[:len(expected)] == expected
    assert '/skills' in updated