bazelbuild / bazelbuild/rules_testing
Support None values
- Dominant language
- Starlark
- Stars
- 29
- Forks
- 11
- Avg merge
- 15h 15m
- Merged PRs (30d)
- 3
Description
Support for None is very spotty. I think IntSubject supports it, maybe string, but not all of them. None doesn't happen much in rule code per-se, more so in utility functions. It's common enough that not having this makes using rules_testing a bit of a pain.
So implement allowing a None as the actual value and having None passed to equals() and not_equals(). Basic support should be pretty easy (i.e. just asserting None on a None value). Handling a None actual value for all the other assertions might be more involved -- almost all of them assume they are working with a non-None value. We can start with basic and go from there, though.
Subjects to update:
* [ ] Bool
* [ ] Collection
* [ ] DefaultInfo
* [ ] DepsetFile
* [ ] Dict
* [ ] File
* [ ] Int
* [ ] Label
* [ ] Runfiles
* [ ] Str
* [ ] Struct
* [ ] Target
Contributor guide
Assessment
This issue has not been assessed yet.