From b8f42410e4dd2dd100c00fb978dc4f138e375bba Mon Sep 17 00:00:00 2001 From: Tom Dooner Date: Wed, 10 Aug 2016 20:23:58 -0700 Subject: [PATCH] Add detailed assertion fail message --- netfile_raw/management/commands/downloadnetfilerawdata.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/netfile_raw/management/commands/downloadnetfilerawdata.py b/netfile_raw/management/commands/downloadnetfilerawdata.py index 62bf91cf..d1269171 100644 --- a/netfile_raw/management/commands/downloadnetfilerawdata.py +++ b/netfile_raw/management/commands/downloadnetfilerawdata.py @@ -212,7 +212,8 @@ def combine(self): headers_written = headers else: # make sure things don't go all wierd between files. - assert headers == headers_written + assert headers == headers_written, \ + 'Headers in %s do not match the first written csv' % (csv_path,) for line in agency_csv.readlines(): combined_csv.write(','.join([agency, line]))