11import os , pytest
22
3+
34class TestGitArchiveFile :
45 def test_init (self , temp_repo ):
56 git = temp_repo .get_repo_git ()
@@ -16,14 +17,17 @@ def test_archive_file_on_tags_branch(self, temp_repo):
1617 filename = "{0}.{1}.zip" .format (temp_repo .get_repo_dirname (), git .describe ())
1718 assert filename in os .listdir ()
1819
19- def test_archive_file_on_any_not_tags_branch_without_default_branch (self , temp_repo ):
20+ def test_archive_file_on_any_not_tags_branch_without_default_branch (
21+ self , temp_repo
22+ ):
2023 git = temp_repo .get_repo_git ()
2124 git .checkout ("-b" , "not-tags-branch" )
2225 temp_repo .invoke_installed_extras_command ("archive-file" )
2326 filename = "{0}.{1}.{2}.zip" .format (
24- temp_repo .get_repo_dirname (),
25- git .describe ("--always" , "--long" ),
26- "not-tags-branch" )
27+ temp_repo .get_repo_dirname (),
28+ git .describe ("--always" , "--long" ),
29+ "not-tags-branch" ,
30+ )
2731 assert filename in os .listdir ()
2832
2933 def test_archive_file_on_any_not_tags_branch_with_default_branch (self , temp_repo ):
@@ -32,28 +36,28 @@ def test_archive_file_on_any_not_tags_branch_with_default_branch(self, temp_repo
3236 git .config ("git-extras.default-branch" , "default" )
3337 temp_repo .invoke_installed_extras_command ("archive-file" )
3438 filename = "{0}.{1}.zip" .format (
35- temp_repo .get_repo_dirname (),
36- git . describe ( "--always" , "--long" ) )
39+ temp_repo .get_repo_dirname (), git . describe ( "--always" , "--long" )
40+ )
3741 assert filename in os .listdir ()
3842
3943 def test_archive_file_on_branch_name_has_slash (self , temp_repo ):
4044 git = temp_repo .get_repo_git ()
4145 git .checkout ("-b" , "feature/slash" )
4246 temp_repo .invoke_installed_extras_command ("archive-file" )
4347 filename = "{0}.{1}.{2}.zip" .format (
44- temp_repo .get_repo_dirname (),
45- git .describe ("--always" , "--long" ),
46- "feature-slash" )
48+ temp_repo .get_repo_dirname (),
49+ git .describe ("--always" , "--long" ),
50+ "feature-slash" ,
51+ )
4752 assert filename in os .listdir ()
4853
4954 @pytest .mark .parametrize ("named_temp_repo" , ["backslash\\ dir" ], indirect = True )
5055 def test_archive_file_on_dirname_has_backslash (self , named_temp_repo ):
5156 named_temp_repo .invoke_installed_extras_command ("archive-file" )
5257 git = named_temp_repo .get_repo_git ()
5358 filename = "{0}.{1}.{2}.zip" .format (
54- "backslash-dir" ,
55- git .describe ("--always" , "--long" ),
56- "default" )
59+ "backslash-dir" , git .describe ("--always" , "--long" ), "default"
60+ )
5761 assert filename in os .listdir ()
5862
5963 def test_archive_file_on_tag_name_has_slash (self , temp_repo ):
@@ -65,6 +69,6 @@ def test_archive_file_on_tag_name_has_slash(self, temp_repo):
6569 temp_repo .invoke_installed_extras_command ("archive-file" )
6670 description_include_version = git .describe ("--always" , "--long" )
6771 filename = "{0}.{1}.zip" .format (
68- temp_repo .get_repo_dirname (),
69- description_include_version . replace ( "/" , "-" ) )
72+ temp_repo .get_repo_dirname (), description_include_version . replace ( "/" , "-" )
73+ )
7074 assert filename in os .listdir ()
0 commit comments