1- import os , pytest
1+ import os
2+ import pytest
3+
24
35class TestGitArchiveFile :
46 def test_init (self , temp_repo ):
@@ -16,14 +18,17 @@ def test_archive_file_on_tags_branch(self, temp_repo):
1618 filename = "{0}.{1}.zip" .format (temp_repo .get_repo_dirname (), git .describe ())
1719 assert filename in os .listdir ()
1820
19- def test_archive_file_on_any_not_tags_branch_without_default_branch (self , temp_repo ):
21+ def test_archive_file_on_any_not_tags_branch_without_default_branch (
22+ self , temp_repo
23+ ):
2024 git = temp_repo .get_repo_git ()
2125 git .checkout ("-b" , "not-tags-branch" )
2226 temp_repo .invoke_installed_extras_command ("archive-file" )
2327 filename = "{0}.{1}.{2}.zip" .format (
24- temp_repo .get_repo_dirname (),
25- git .describe ("--always" , "--long" ),
26- "not-tags-branch" )
28+ temp_repo .get_repo_dirname (),
29+ git .describe ("--always" , "--long" ),
30+ "not-tags-branch" ,
31+ )
2732 assert filename in os .listdir ()
2833
2934 def test_archive_file_on_any_not_tags_branch_with_default_branch (self , temp_repo ):
@@ -32,28 +37,28 @@ def test_archive_file_on_any_not_tags_branch_with_default_branch(self, temp_repo
3237 git .config ("git-extras.default-branch" , "default" )
3338 temp_repo .invoke_installed_extras_command ("archive-file" )
3439 filename = "{0}.{1}.zip" .format (
35- temp_repo .get_repo_dirname (),
36- git . describe ( "--always" , "--long" ) )
40+ temp_repo .get_repo_dirname (), git . describe ( "--always" , "--long" )
41+ )
3742 assert filename in os .listdir ()
3843
3944 def test_archive_file_on_branch_name_has_slash (self , temp_repo ):
4045 git = temp_repo .get_repo_git ()
4146 git .checkout ("-b" , "feature/slash" )
4247 temp_repo .invoke_installed_extras_command ("archive-file" )
4348 filename = "{0}.{1}.{2}.zip" .format (
44- temp_repo .get_repo_dirname (),
45- git .describe ("--always" , "--long" ),
46- "feature-slash" )
49+ temp_repo .get_repo_dirname (),
50+ git .describe ("--always" , "--long" ),
51+ "feature-slash" ,
52+ )
4753 assert filename in os .listdir ()
4854
4955 @pytest .mark .parametrize ("named_temp_repo" , ["backslash\\ dir" ], indirect = True )
5056 def test_archive_file_on_dirname_has_backslash (self , named_temp_repo ):
5157 named_temp_repo .invoke_installed_extras_command ("archive-file" )
5258 git = named_temp_repo .get_repo_git ()
5359 filename = "{0}.{1}.{2}.zip" .format (
54- "backslash-dir" ,
55- git .describe ("--always" , "--long" ),
56- "default" )
60+ "backslash-dir" , git .describe ("--always" , "--long" ), "default"
61+ )
5762 assert filename in os .listdir ()
5863
5964 def test_archive_file_on_tag_name_has_slash (self , temp_repo ):
@@ -65,6 +70,6 @@ def test_archive_file_on_tag_name_has_slash(self, temp_repo):
6570 temp_repo .invoke_installed_extras_command ("archive-file" )
6671 description_include_version = git .describe ("--always" , "--long" )
6772 filename = "{0}.{1}.zip" .format (
68- temp_repo .get_repo_dirname (),
69- description_include_version . replace ( "/" , "-" ) )
73+ temp_repo .get_repo_dirname (), description_include_version . replace ( "/" , "-" )
74+ )
7075 assert filename in os .listdir ()
0 commit comments