The behaviour seems to have been introduced in commit
95489bd443e9a654 that modified the schema of an empty list in order
to provide a consistent behaviour between Schema({}) and Schema([]).
The commit introduced an enumeration of the incorrect values rather
than the expected behaviour of showing the key with the incorrect
value.
This commit provides the expected behaviour, and is also consistent
with the 'pathless' behaviour currently implemented, meaning that
Schema([])([1]) -> 'not a valid value @ data[1]'
Schema({'key': []})({'key': [1]) -> 'not a valid dictionary value @ data['key'].
Finally, as new unit test is provided to ensure that the new behaviour
remains intact.
Coverage increased (+0.8%) to 95.617% when pulling 10a78d033c3c56448c8af4e7f70a237a5826e65f on monopolis:issue-397 into 7151438f2957debb04019400e6552965fd04c867 on alecthomas:master.
Coverage increased (+0.8%) to 95.617% when pulling 10a78d033c3c56448c8af4e7f70a237a5826e65f on monopolis:issue-397 into 7151438f2957debb04019400e6552965fd04c867 on alecthomas:master.
The behaviour seems to have been introduced in commit 95489bd443e9a654 that modified the schema of an empty list in order to provide a consistent behaviour between Schema({}) and Schema([]).
The commit introduced an enumeration of the incorrect values rather than the expected behaviour of showing the key with the incorrect value.
This commit provides the expected behaviour, and is also consistent with the 'pathless' behaviour currently implemented, meaning that
Finally, as new unit test is provided to ensure that the new behaviour remains intact.