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