Closed elsapassaro closed 3 years ago
The test failure looks like something I should look into.
Edit: Fixed in #55
Thanks @greschd, I've addressed your comments and added a test for the "failing" parsing.
Regarding the test for the case validate_species_names=False
, I get the expected InputValidationError
when I try to create the reference file with ./test_parsers.py --write-ref non_matching_species
.
One thing I can do is to create the reference json using the code of the print_test_comparison
function. Or I could modify the function here to add a validate_species_names
parameter.
One thing I can do is to create the reference json using the code of the print_test_comparison function. Or I could modify the function here to add a validate_species_names parameter.
I think it would be ok to either add a flag, or just hard-code validate_species_names=False
in the print_test_comparison
function. Up to you if you want to add that to this PR.
I've just set validate_species_names=False
here, since if the test is supposed to fail there's no need for creating the json comparison.
Validate species names in the
ATOMIC_SPECIES
card block. This will check that the atom names and the species names parsed from the pseudopotential file names are the same up to an optional underscore and/or optional digits.