Skip to content

Commit

Permalink
Add test for every supported archive format.
Browse files Browse the repository at this point in the history
  • Loading branch information
Kentzo committed Nov 7, 2018
1 parent ec5147e commit 9bccb73
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions test_git_archive_all.py
Original file line number Diff line number Diff line change
Expand Up @@ -390,6 +390,24 @@ def test_explicitly_excluded_dir(base_repo, tmpdir, git_env):
repo_tar.getmember('lib/extra/__init__.py')


@pytest.mark.parametrize('format', [
'tar',
'tar.bz2',
'tar.gz',
'tar.xz',
'tbz2',
'tgz',
'txz',
'zip',
'bz2',
'gz',
'xz'
])
def test_formats(base_repo, tmpdir, format):
repo_archive_path = os.path.join(str(tmpdir), 'repo.' + format)
base_repo.archive(repo_archive_path)


def test_pycodestyle():
style = pycodestyle.StyleGuide(repeat=True, max_line_length=240)
report = style.check_files(['git_archive_all.py'])
Expand Down

0 comments on commit 9bccb73

Please sign in to comment.