Support None values
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Stale
- Domain
- testing
Research direction
Start by reading the Bool, Collection, DefaultInfo, DepsetFile, Dict, File, Int, Label, Runfiles, Str, Struct, and Target subject implementations, noting any existing None handling. Begin with basic assertions for a None actual value and None passed to equals() and not_equals(); done means the supported subjects handle these cases consistently.
Written by the indexing model from the issue text.
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
- Dominant language
- Starlark
- Stars
- 29
- Forks
- 11
- Avg merge
- 15h 15m
- Merged PRs (30d)
- 3
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from bazelbuild/rules_testing
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
bazelbuild/rules_testing#93 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 35/100
bazelbuild/rules_testing#88 ·
-
enhancement
Difficulty 4/5 3-5 days Newbie friendliness 45/100
bazelbuild/rules_testing#72 ·
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 52/100
bazelbuild/rules_testing#71 ·
-
enhancement
Difficulty 3/5 1-2 days Newbie friendliness 45/100
bazelbuild/rules_testing#65 ·
All issues in bazelbuild/rules_testing
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
copse-dev/agent-pane#2953 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
simonw/sqlite-utils#872 ·
-
calcite-components needs triage refactor
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Esri/calcite-design-system#15203 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
danielmiessler/LifeOS#2218 ·
-
kind/cleanup
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
kubernetes-sigs/kueue#15947 ·