Skip to content

Commit 7f85877

Browse files
committed
Fixed that everyting with empt is invalid
1 parent 96a5291 commit 7f85877

File tree

7 files changed

+4
-15
lines changed

7 files changed

+4
-15
lines changed

CHANGELOG.txt

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
* Updated test suite
44
* Fixed detecting when infinity is reached with multipleOf
55
* Fixed that min/max items/lenght/properties can be float
6+
* Fixed that everything with empty `not` is invalid
67

78
=== 2.20.0 (2024-06-15)
89

Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jsonschemasuitcases:
2929
git submodule update
3030

3131
test: venv jsonschemasuitcases
32-
${PYTHON} -m pytest -W default --benchmark-skip
32+
${PYTHON} -m pytest -W default --benchmark-skip #tests/json_schema/test_draft07.py
3333
test-lf: venv jsonschemasuitcases
3434
${PYTHON} -m pytest -W default --benchmark-skip --last-failed
3535

fastjsonschema/draft04.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -211,8 +211,7 @@ def generate_not(self):
211211
elif not_definition is False:
212212
return
213213
elif not not_definition:
214-
with self.l('if {}:', self._variable):
215-
self.exc('{name} must NOT match a disallowed definition', rule='not')
214+
self.exc('{name} must NOT match a disallowed definition', rule='not')
216215
else:
217216
with self.l('try:', optimize=False):
218217
self.generate_func_code_block(not_definition, self._variable, self._variable_name)

tests/json_schema/test_draft04.py

-3
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,6 @@ def pytest_generate_tests(metafunc):
1919
'const.json',
2020
'enum.json',
2121

22-
# TODO: fix empty schema == invalid
23-
'not.json',
24-
2522
# TODO: fix formats
2623
'email.json',
2724
'date-time.json',

tests/json_schema/test_draft06.py

-3
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,6 @@ def pytest_generate_tests(metafunc):
1919
'const.json',
2020
'enum.json',
2121

22-
# TODO: fix empty schema == invalid
23-
'not.json',
24-
2522
# TODO: fix formats
2623
'email.json',
2724
'date-time.json',

tests/json_schema/test_draft07.py

-3
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,6 @@ def pytest_generate_tests(metafunc):
2121
'const.json',
2222
'enum.json',
2323

24-
# TODO: fix empty schema == invalid
25-
'not.json',
26-
2724
# TODO: fix formats
2825
'email.json',
2926
'date-time.json',

tests/json_schema/test_draft2019.py

+1-3
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,6 @@ def pytest_generate_tests(metafunc):
2121
'const.json',
2222
'enum.json',
2323

24-
# TODO: fix empty schema == invalid
25-
'not.json',
26-
2724
# TODO: fix formats
2825
'email.json',
2926
'date-time.json',
@@ -42,6 +39,7 @@ def pytest_generate_tests(metafunc):
4239
'definitions.json',
4340

4441
# TODO: new stuff, not implemented yet
42+
'not.json',
4543
'anchor.json',
4644
'content.json',
4745
'defs.json',

0 commit comments

Comments
 (0)