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

Commit

Permalink
Make tests/datatests/test_new_tasks.py work (#3167)
Browse files Browse the repository at this point in the history
* Make tests/datatests/test_new_tasks.py work

Values were there, just the format changed slightly.

Tested/debugged by changing
  `parlai/tasks/jsonfile/agents.py`
to load in the example json file colocated in the same directly.

Printed the results of `verify(opt)` as well as the `KEYS` object; that made it clear-ish what ought to be happening.

* lint
  • Loading branch information
moyapchen authored Oct 7, 2020
1 parent c963aec commit 67bea8c
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions tests/datatests/test_new_tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,14 +59,18 @@ def test_verify_data(self):
opt['task'] = subt
try:
with testing_utils.capture_output():
text, log = verify(opt)
verify_results = verify(opt)
except Exception:
found_errors = True
traceback.print_exc()
print("Got above exception in {}".format(subt))
for key in KEYS:
if log[key] != 0:
print('There are {} {} in {}.'.format(log[key], key, subt))
if verify_results[key] != 0:
print(
'There are {} {} in {}.'.format(
verify_results[key], key, subt
)
)
found_errors = True

if found_errors:
Expand Down

0 comments on commit 67bea8c

Please sign in to comment.