#1038 policy tests should handle None/missing values gracefully
Closed: Fixed 5 years ago Opened 5 years ago by mikem.

This is a follow up to PR #1000

Policy tests might be called with a wide range of data. It would generally be better to avoid raising an exception unless the the data is clearly nonsensical.

Many of our tests are already "friendly" in this regard, but some are not. In particular:

  • BoolTest could default to false when the field is absent. Policies that care about the difference can use the has test to distinguish.
  • Similarly our other base tests that use fields (MatchTest and CompareTest) could return False if there is no field to match

Metadata Update from @mikem:
- Issue set to the milestone: 1.17

5 years ago

Assigning to 1.17 for now, though maybe this needs to be in 1.16.1 ?

Login to comment on this ticket.

Metadata
Related Pull Requests
  • #1042 Merged 5 years ago