File tree 2 files changed +13
-2
lines changed
2 files changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -154,7 +154,7 @@ def find_git_project_root() -> Optional[Path]:
154
154
155
155
156
156
def is_staging_clean () -> bool :
157
- """Check if staing is clean."""
157
+ """Check if staging is clean."""
158
158
c = cmd .run ("git diff --no-ext-diff --cached --name-only" )
159
159
return not bool (c .out )
160
160
Original file line number Diff line number Diff line change @@ -70,7 +70,7 @@ def test_get_commits_author_and_email():
70
70
create_file_and_commit ("fix: username exception" )
71
71
commit = git .get_commits ()[0 ]
72
72
73
- assert commit .author is not ""
73
+ assert commit .author != ""
74
74
assert "@" in commit .author_email
75
75
76
76
@@ -181,7 +181,18 @@ def test_is_staging_clean(tmp_commitizen_project):
181
181
assert git .is_staging_clean () is True
182
182
183
183
cmd .run ("touch test_file" )
184
+
185
+ assert git .is_staging_clean () is True
186
+
184
187
cmd .run ("git add test_file" )
188
+
189
+ assert git .is_staging_clean () is False
190
+
191
+ cmd .run ("git commit -m 'add test_file'" )
185
192
cmd .run ("echo 'test' > test_file" )
186
193
194
+ assert git .is_staging_clean () is True
195
+
196
+ cmd .run ("git add test_file" )
197
+
187
198
assert git .is_staging_clean () is False
You can’t perform that action at this time.
0 commit comments