Skip to content
This repository has been archived by the owner on Nov 3, 2023. It is now read-only.

Commit

Permalink
[tests] Make crowdsource tests whitespace-agnostic (#3628)
Browse files Browse the repository at this point in the history
  • Loading branch information
stephenroller authored Apr 28, 2021
1 parent 2f0e387 commit 823a583
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion parlai/crowdsourcing/tasks/acute_eval/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,9 @@ def _check_file_contents(
results_folder=results_folder, file_suffix=file_suffix
)
with open(file_path) as f:
contents = f.read()
# correct whitespace to deal with fbcode demanding disk files not
# have many trailing newlines
contents = f.read().rstrip('\n') + '\n'
file_regression.check(contents=contents)

def _get_matching_file_path(self, results_folder: str, file_suffix: str) -> str:
Expand Down

0 comments on commit 823a583

Please sign in to comment.