Skip to content

Commit 164ff42

Browse files
committed
Closer to the structure we want now.
1 parent fdc3234 commit 164ff42

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

jsonschema/tests/_suite.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -119,21 +119,23 @@ def to_unittest_testcase(self, *suites, **kwargs):
119119
test.to_unittest_method(**kwargs),
120120
)
121121
for suite in suites
122-
for test in suite
122+
for tests in suite
123+
for test in tests
123124
}
124125
return type(name, (unittest.TestCase,), methods)
125126

126127
def _tests_in(self, subject, path):
127128
for each in json.loads(path.getContent().decode("utf-8")):
128-
for test in each["tests"]:
129-
yield _Test(
129+
yield (
130+
_Test(
130131
collection=self,
131132
subject=subject,
132133
case_description=each["description"],
133134
schema=each["schema"],
134135
remotes=self._remotes,
135136
**test
136-
)
137+
) for test in each["tests"]
138+
)
137139

138140

139141
@attr.s(hash=True, repr=False)

0 commit comments

Comments
 (0)