Skip to content

Commit 19dce4c

Browse files
committed
Minor changes in test_bark_module
1 parent 14af5c4 commit 19dce4c

File tree

6 files changed

+10
-15
lines changed

6 files changed

+10
-15
lines changed

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
11
*.pyc
22
.vscode
3+
*.egg-info/
4+
tests/test_bark_module/build/

gitbark/cli/__main__.py

+3-4
Original file line numberDiff line numberDiff line change
@@ -229,11 +229,10 @@ def verify(ctx, target, all, bootstrap, ref_update):
229229

230230
branch = None
231231
if ref_update:
232-
if ref_update.ref_name in project.repo.references:
233-
branch = project.repo.references[ref_update.ref_name].shorthand
234-
head = Commit(ref_update.new_ref, project.repo)
235-
else:
232+
if ref_update.ref_name not in project.repo.references:
236233
return
234+
branch = project.repo.references[ref_update.ref_name].shorthand
235+
head = Commit(ref_update.new_ref, project.repo)
237236
elif isinstance(target, Branch):
238237
branch = target.shorthand
239238
head = Commit(target.target, project.repo)
Binary file not shown.

tests/test_bark_module/setup.cfg

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,5 @@ packages = find:
88

99
[options.entry_points]
1010
bark_rules =
11-
always_fail = test_bark_core.rules:AlwaysFailRule
12-
always_pass = test_bark_core.rules:AlwaysPassRule
11+
always_fail = test_bark_core.rules:AlwaysFailRule
12+
always_pass = test_bark_core.rules:AlwaysPassRule

tests/test_bark_module/setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33

44
"""
5-
Setup script for `bark_core`
5+
Setup script for `test_bark_core`
66
"""
77

88

tests/util.py

+2-8
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,7 @@
3232

3333
def get_test_bark_module():
3434
cwd = os.getcwd()
35-
return os.path.join(
36-
cwd, "tests", "test_bark_module", "dist", "test-bark-core-0.0.1.tar.gz"
37-
)
35+
return os.path.join(cwd, "tests", "test_bark_module")
3836

3937

4038
def random_string(length: int = 10):
@@ -64,11 +62,7 @@ def initialize_git(self) -> None:
6462
"git", "checkout", "-b", "main", cwd=self.repo_dir
6563
) # make init independent of Git version
6664

67-
def set_git_user(
68-
self,
69-
name: str = "Test",
70-
email: str = "[email protected]"
71-
) -> None:
65+
def set_git_user(self, name: str = "Test", email: str = "[email protected]") -> None:
7266
cmd("git", "config", "user.email", email, cwd=self.repo_dir)
7367
cmd("git", "config", "user.name", name, cwd=self.repo_dir)
7468

0 commit comments

Comments
 (0)