11import os , pytest
22
3-
43class TestGitArchiveFile :
54 def test_init (self , temp_repo ):
65 git = temp_repo .get_repo_git ()
@@ -17,17 +16,14 @@ def test_archive_file_on_tags_branch(self, temp_repo):
1716 filename = "{0}.{1}.zip" .format (temp_repo .get_repo_dirname (), git .describe ())
1817 assert filename in os .listdir ()
1918
20- def test_archive_file_on_any_not_tags_branch_without_default_branch (
21- self , temp_repo
22- ):
19+ def test_archive_file_on_any_not_tags_branch_without_default_branch (self , temp_repo ):
2320 git = temp_repo .get_repo_git ()
2421 git .checkout ("-b" , "not-tags-branch" )
2522 temp_repo .invoke_installed_extras_command ("archive-file" )
2623 filename = "{0}.{1}.{2}.zip" .format (
27- temp_repo .get_repo_dirname (),
28- git .describe ("--always" , "--long" ),
29- "not-tags-branch" ,
30- )
24+ temp_repo .get_repo_dirname (),
25+ git .describe ("--always" , "--long" ),
26+ "not-tags-branch" )
3127 assert filename in os .listdir ()
3228
3329 def test_archive_file_on_any_not_tags_branch_with_default_branch (self , temp_repo ):
@@ -36,28 +32,28 @@ def test_archive_file_on_any_not_tags_branch_with_default_branch(self, temp_repo
3632 git .config ("git-extras.default-branch" , "default" )
3733 temp_repo .invoke_installed_extras_command ("archive-file" )
3834 filename = "{0}.{1}.zip" .format (
39- temp_repo .get_repo_dirname (), git . describe ( "--always" , "--long" )
40- )
35+ temp_repo .get_repo_dirname (),
36+ git . describe ( "--always" , "--long" ) )
4137 assert filename in os .listdir ()
4238
4339 def test_archive_file_on_branch_name_has_slash (self , temp_repo ):
4440 git = temp_repo .get_repo_git ()
4541 git .checkout ("-b" , "feature/slash" )
4642 temp_repo .invoke_installed_extras_command ("archive-file" )
4743 filename = "{0}.{1}.{2}.zip" .format (
48- temp_repo .get_repo_dirname (),
49- git .describe ("--always" , "--long" ),
50- "feature-slash" ,
51- )
44+ temp_repo .get_repo_dirname (),
45+ git .describe ("--always" , "--long" ),
46+ "feature-slash" )
5247 assert filename in os .listdir ()
5348
5449 @pytest .mark .parametrize ("named_temp_repo" , ["backslash\\ dir" ], indirect = True )
5550 def test_archive_file_on_dirname_has_backslash (self , named_temp_repo ):
5651 named_temp_repo .invoke_installed_extras_command ("archive-file" )
5752 git = named_temp_repo .get_repo_git ()
5853 filename = "{0}.{1}.{2}.zip" .format (
59- "backslash-dir" , git .describe ("--always" , "--long" ), "default"
60- )
54+ "backslash-dir" ,
55+ git .describe ("--always" , "--long" ),
56+ "default" )
6157 assert filename in os .listdir ()
6258
6359 def test_archive_file_on_tag_name_has_slash (self , temp_repo ):
@@ -69,6 +65,6 @@ def test_archive_file_on_tag_name_has_slash(self, temp_repo):
6965 temp_repo .invoke_installed_extras_command ("archive-file" )
7066 description_include_version = git .describe ("--always" , "--long" )
7167 filename = "{0}.{1}.zip" .format (
72- temp_repo .get_repo_dirname (), description_include_version . replace ( "/" , "-" )
73- )
68+ temp_repo .get_repo_dirname (),
69+ description_include_version . replace ( "/" , "-" ) )
7470 assert filename in os .listdir ()
0 commit comments