Skip to content

Commit a096413

Browse files
indent as w was weight_enum
1 parent a515ac6 commit a096413

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

test/test_prototype_models.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,7 @@ def test_schema_meta_validation(model_fn):
117117

118118
problematic_weights = {}
119119
incorrect_params = []
120+
bad_names = []
120121
for w in weights_enum:
121122
missing_fields = fields - set(w.meta.keys())
122123
if missing_fields:
@@ -134,11 +135,10 @@ def test_schema_meta_validation(model_fn):
134135
if w.meta.get("num_params") != weights_enum.DEFAULT.meta.get("num_params"):
135136
incorrect_params.append(w)
136137

137-
bad_names = []
138-
for k, v in weights_enum.__members__.items():
139-
# Weights are constant members, thus should be all capital
140-
if isinstance(v, Weights) and not k.isupper():
141-
bad_names.append(k)
138+
for k, v in w.__members__.items():
139+
# Weights are constant members, thus should be all capital
140+
if isinstance(v, Weights) and not k.isupper():
141+
bad_names.append(k)
142142

143143
assert not problematic_weights
144144
assert not incorrect_params

0 commit comments

Comments
 (0)