@@ -406,10 +406,10 @@ def test_bump_files_only(mocker: MockFixture, tmp_commitizen_project):
406
406
tag_exists = git .tag_exist ("0.3.0" )
407
407
assert tag_exists is False
408
408
409
- with open (tmp_version_file , "r" , encoding = "utf-8" ) as f :
409
+ with open (tmp_version_file , encoding = "utf-8" ) as f :
410
410
assert "0.3.0" in f .read ()
411
411
412
- with open (tmp_commitizen_cfg_file , "r" , encoding = "utf-8" ) as f :
412
+ with open (tmp_commitizen_cfg_file , encoding = "utf-8" ) as f :
413
413
assert "0.3.0" in f .read ()
414
414
415
415
@@ -431,7 +431,7 @@ def test_bump_local_version(mocker: MockFixture, tmp_commitizen_project):
431
431
tag_exists = git .tag_exist ("4.5.1+0.2.0" )
432
432
assert tag_exists is True
433
433
434
- with open (tmp_version_file , "r" , encoding = "utf-8" ) as f :
434
+ with open (tmp_version_file , encoding = "utf-8" ) as f :
435
435
assert "4.5.1+0.2.0" in f .read ()
436
436
437
437
@@ -511,7 +511,7 @@ def test_bump_with_changelog_arg(mocker: MockFixture, changelog_path):
511
511
tag_exists = git .tag_exist ("0.2.0" )
512
512
assert tag_exists is True
513
513
514
- with open (changelog_path , "r" , encoding = "utf-8" ) as f :
514
+ with open (changelog_path , encoding = "utf-8" ) as f :
515
515
out = f .read ()
516
516
assert out .startswith ("#" )
517
517
assert "0.2.0" in out
@@ -529,7 +529,7 @@ def test_bump_with_changelog_config(mocker: MockFixture, changelog_path, config_
529
529
tag_exists = git .tag_exist ("0.2.0" )
530
530
assert tag_exists is True
531
531
532
- with open (changelog_path , "r" , encoding = "utf-8" ) as f :
532
+ with open (changelog_path , encoding = "utf-8" ) as f :
533
533
out = f .read ()
534
534
assert out .startswith ("#" )
535
535
assert "0.2.0" in out
@@ -572,7 +572,7 @@ def test_bump_with_changelog_to_stdout_arg(mocker: MockFixture, capsys, changelo
572
572
tag_exists = git .tag_exist ("0.2.0" )
573
573
assert tag_exists is True
574
574
575
- with open (changelog_path , "r" , encoding = "utf-8" ) as f :
575
+ with open (changelog_path , encoding = "utf-8" ) as f :
576
576
out = f .read ()
577
577
assert out .startswith ("#" )
578
578
assert "0.2.0" in out
@@ -911,7 +911,7 @@ def test_bump_command_prelease_scheme_via_cli(
911
911
assert tag_exists is True
912
912
913
913
for version_file in [tmp_version_file , tmp_commitizen_cfg_file ]:
914
- with open (version_file , "r" ) as f :
914
+ with open (version_file ) as f :
915
915
assert "0.2.0-a0" in f .read ()
916
916
917
917
# PRERELEASE BUMP CREATES VERSION WITHOUT PRERELEASE
@@ -923,7 +923,7 @@ def test_bump_command_prelease_scheme_via_cli(
923
923
assert tag_exists is True
924
924
925
925
for version_file in [tmp_version_file , tmp_commitizen_cfg_file ]:
926
- with open (version_file , "r" ) as f :
926
+ with open (version_file ) as f :
927
927
assert "0.2.0" in f .read ()
928
928
929
929
@@ -944,7 +944,7 @@ def test_bump_command_prelease_scheme_via_config(
944
944
assert tag_exists is True
945
945
946
946
for version_file in [tmp_version_file , tmp_commitizen_cfg_file ]:
947
- with open (version_file , "r" ) as f :
947
+ with open (version_file ) as f :
948
948
assert "0.2.0-a0" in f .read ()
949
949
950
950
testargs = ["cz" , "bump" , "--prerelease" , "alpha" , "--yes" ]
@@ -955,7 +955,7 @@ def test_bump_command_prelease_scheme_via_config(
955
955
assert tag_exists is True
956
956
957
957
for version_file in [tmp_version_file , tmp_commitizen_cfg_file ]:
958
- with open (version_file , "r" ) as f :
958
+ with open (version_file ) as f :
959
959
assert "0.2.0-a1" in f .read ()
960
960
961
961
# PRERELEASE BUMP CREATES VERSION WITHOUT PRERELEASE
@@ -967,7 +967,7 @@ def test_bump_command_prelease_scheme_via_config(
967
967
assert tag_exists is True
968
968
969
969
for version_file in [tmp_version_file , tmp_commitizen_cfg_file ]:
970
- with open (version_file , "r" ) as f :
970
+ with open (version_file ) as f :
971
971
assert "0.2.0" in f .read ()
972
972
973
973
@@ -988,7 +988,7 @@ def test_bump_command_prelease_scheme_check_old_tags(
988
988
assert tag_exists is True
989
989
990
990
for version_file in [tmp_version_file , tmp_commitizen_cfg_file ]:
991
- with open (version_file , "r" ) as f :
991
+ with open (version_file ) as f :
992
992
assert "0.2.0-a0" in f .read ()
993
993
994
994
testargs = ["cz" , "bump" , "--prerelease" , "alpha" ]
@@ -999,7 +999,7 @@ def test_bump_command_prelease_scheme_check_old_tags(
999
999
assert tag_exists is True
1000
1000
1001
1001
for version_file in [tmp_version_file , tmp_commitizen_cfg_file ]:
1002
- with open (version_file , "r" ) as f :
1002
+ with open (version_file ) as f :
1003
1003
assert "0.2.0-a1" in f .read ()
1004
1004
1005
1005
# PRERELEASE BUMP CREATES VERSION WITHOUT PRERELEASE
@@ -1011,7 +1011,7 @@ def test_bump_command_prelease_scheme_check_old_tags(
1011
1011
assert tag_exists is True
1012
1012
1013
1013
for version_file in [tmp_version_file , tmp_commitizen_cfg_file ]:
1014
- with open (version_file , "r" ) as f :
1014
+ with open (version_file ) as f :
1015
1015
assert "0.2.0" in f .read ()
1016
1016
1017
1017
0 commit comments