Skip to content

Commit

Permalink
Account for backslash being dropped on Windows GitHub Actions.
Browse files Browse the repository at this point in the history
  • Loading branch information
dstein64 committed Nov 15, 2022
1 parent 5e6cd35 commit 443b48b
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion tests/test_vimgolf.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,13 @@ def test_play(self):
self.assertEqual(status, Status.SUCCESS)
self.assertEqual(results[-1].correct, play_spec.correct)
self.assertEqual(len(results), 1)
self.assertEqual(results[-1].score, len(tokenize_keycode_reprs(play_spec.init_keys)))
expected_score = len(tokenize_keycode_reprs(play_spec.init_keys))
if (win_github_actions
and not results[-1].correct
and '\\' in play_spec.init_keys):
# Account for backslash getting dropped on GitHub Actions on Windows.
expected_score -= play_spec.init_keys.count('\\')
self.assertEqual(results[-1].score, expected_score)


if __name__ == '__main__':
Expand Down

0 comments on commit 443b48b

Please sign in to comment.