fix #942: type_match None

This commit is contained in:
debugtalk
2020-06-21 15:04:04 +08:00
parent 6710eba1fc
commit 2b75d78df0
5 changed files with 19 additions and 1 deletions

View File

@@ -80,7 +80,10 @@ def type_match(check_value, expect_value):
else:
raise ValueError(name)
assert isinstance(check_value, get_type(expect_value))
if expect_value in ["None", "NoneType", None]:
assert check_value is None
else:
assert type(check_value) == get_type(expect_value)
def regex_match(check_value, expect_value):