Spec.format: print false attributes if requested (#37932)
This commit is contained in:
parent
3bb86418b8
commit
dace0316a2
@ -4333,7 +4333,7 @@ def write_attribute(spec, attribute, color):
|
|||||||
|
|
||||||
if callable(current):
|
if callable(current):
|
||||||
raise SpecFormatStringError("Attempted to format callable object")
|
raise SpecFormatStringError("Attempted to format callable object")
|
||||||
if not current:
|
if current is None:
|
||||||
# We're not printing anything
|
# We're not printing anything
|
||||||
return
|
return
|
||||||
|
|
||||||
|
@ -660,6 +660,7 @@ def test_spec_formatting(self, default_mock_concretization):
|
|||||||
("{architecture.os}", "", "os", lambda spec: spec.architecture),
|
("{architecture.os}", "", "os", lambda spec: spec.architecture),
|
||||||
("{architecture.target}", "", "target", lambda spec: spec.architecture),
|
("{architecture.target}", "", "target", lambda spec: spec.architecture),
|
||||||
("{prefix}", "", "prefix", lambda spec: spec),
|
("{prefix}", "", "prefix", lambda spec: spec),
|
||||||
|
("{external}", "", "external", lambda spec: spec), # test we print "False"
|
||||||
]
|
]
|
||||||
|
|
||||||
hash_segments = [
|
hash_segments = [
|
||||||
|
Loading…
Reference in New Issue
Block a user