inspirehep / inspire-dojson

INSPIRE-specific rules to transform from MARCXML to JSON and back.
GNU General Public License v3.0
3 stars 18 forks source link

jobs: raise NotSupportedError on migration #261

Closed ammirate closed 4 years ago

ammirate commented 4 years ago

Signed-off-by: Antonio Cesarano cesarano2607@gmail.comk

ammirate commented 4 years ago

After some investigation, I found out that the test test_imprints_from_260__c_wrong_date fails due to tuple index out of range that happens in dateutil/parser/_parser.py when the parser tries to parse the date 2014-00, fails because the month is 0 and tries to raise a ParserError using the element 0 from e.args where e is the previous exception and args is an empty tuple. I'll xfail that, as well as test_normalize_date_aggressively_strips_wrong_month that fails for the same reason.

michamos commented 4 years ago

that's not the correct solution, you can add to the exceptions that's caught in normalize_date_aggressively.

ammirate commented 4 years ago

IMO, that's not a solution but a workaround. It's good enough though, so it's ok.