Skip to content

Commit 5020890

Browse files
authored
Improve defaults for testing suite (#1104)
1 parent 4d8060e commit 5020890

File tree

5 files changed

+11
-6
lines changed

5 files changed

+11
-6
lines changed

.editorconfig

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,6 @@ trim_trailing_whitespace = false
1717

1818
[*.html]
1919
trim_trailing_whitespace = false
20+
21+
[*.py]
22+
indent_size = 4

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ jobs:
4242
runs-on: ubuntu-latest
4343

4444
steps:
45-
- uses: actions/checkout@v3
45+
- uses: actions/checkout@v4
4646
- name: Set up Python 3.10
4747
uses: actions/setup-python@v4
4848
with:

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
.venv/
2+
__pycache__/

tests/helper.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ def __init__(self, repo_work_dir = None):
1818
repo_work_dir = os.path.join(self._system_tmpdir, repo_work_dir)
1919
self._cwd = repo_work_dir
2020
self._tempdirname = self._cwd[len(self._system_tmpdir) + 1:]
21-
self._git_repo = git.Repo.init(repo_work_dir)
21+
self._git_repo = git.Repo.init(repo_work_dir, b="default")
2222
self._files = []
2323

2424
def switch_cwd_under_repo(self):
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ def test_archive_file_on_any_not_tags_branch_without_default_branch(self, temp_r
2828

2929
def test_archive_file_on_any_not_tags_branch_with_default_branch(self, temp_repo):
3030
git = temp_repo.get_repo_git()
31-
git.checkout("master")
32-
git.config("git-extras.default-branch", "master")
31+
git.checkout("default")
32+
git.config("git-extras.default-branch", "default")
3333
temp_repo.invoke_installed_extras_command("archive-file")
3434
filename = "{0}.{1}.zip".format(
3535
temp_repo.get_repo_dirname(),
@@ -53,13 +53,13 @@ def test_archive_file_on_dirname_has_backslash(self, named_temp_repo):
5353
filename = "{0}.{1}.{2}.zip".format(
5454
"backslash-dir",
5555
git.describe("--always", "--long"),
56-
"master")
56+
"default")
5757
assert filename in os.listdir()
5858

5959
def test_archive_file_on_tag_name_has_slash(self, temp_repo):
6060
temp_repo.switch_cwd_under_repo()
6161
git = temp_repo.get_repo_git()
62-
git.checkout("master")
62+
git.checkout("default")
6363
git.tag("--delete", "0.1.0")
6464
git.tag("0.1.0/slash", "-m", "bump: 0.1.0")
6565
temp_repo.invoke_installed_extras_command("archive-file")

0 commit comments

Comments
 (0)