Skip to content

Commit c02c5e3

Browse files
committed
✨ Minor improvement on FHIRUnitTest handling empty value.[nazrulworld]
1 parent a40e486 commit c02c5e3

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

README.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,10 +101,10 @@ True
101101
History
102102
=======
103103

104-
0.2.1 (unreleased)
104+
0.2.1 (15-06-2020)
105105
------------------
106106

107-
- no changes.
107+
- Minor improvement on ``FHIRUnitTest`` handling empty value.
108108

109109
0.2.0 (06-06-2020)
110110
------------------

fhirspec.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2070,6 +2070,8 @@ def expand(self) -> None:
20702070
if list == type(val):
20712071
i = 0
20722072
for ival in val:
2073+
if ival is None:
2074+
continue
20732075
idxpath = self.controller.settings.UNITTEST_FORMAT_PATH_INDEX.format( # noqa: E501
20742076
path, i
20752077
)
@@ -2081,6 +2083,8 @@ def expand(self) -> None:
20812083
if i >= 10: # let's assume we don't need 100s of unit tests
20822084
break
20832085
else:
2086+
if val is None:
2087+
continue
20842088
item = FHIRUnitTestItem(
20852089
self.filepath, path, val, propclass, False, prop.enum
20862090
)

0 commit comments

Comments
 (0)