Skip to content

Commit b28d52e

Browse files
committed
fix test failing on dev pytest
1 parent 740c807 commit b28d52e

1 file changed

Lines changed: 21 additions & 21 deletions

File tree

asdf/_tests/test_custom_schema.py

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -60,67 +60,67 @@ def schema_name(request, test_data_path, as_pathlib):
6060

6161

6262
@pytest.mark.parametrize(
63-
"schema_name, tree, expected_error",
63+
"schema_name, test_tree, expected_error",
6464
TEST_CASES,
6565
indirect=["schema_name"],
6666
)
67-
def test_custom_validation_write_to(tmp_path, schema_name, tree, expected_error):
67+
def test_custom_validation_write_to(tmp_path, schema_name, test_tree, expected_error):
6868
asdf_file = tmp_path / "out.asdf"
6969

7070
ctx = pytest.raises(ValidationError, match=expected_error) if expected_error else nullcontext()
7171
with ctx:
72-
asdf.AsdfFile(tree, custom_schema=schema_name).write_to(asdf_file)
72+
asdf.AsdfFile(test_tree, custom_schema=schema_name).write_to(asdf_file)
7373

7474

7575
@pytest.mark.parametrize(
76-
"schema_name, tree, expected_error",
76+
"schema_name, test_tree, expected_error",
7777
TEST_CASES,
7878
indirect=["schema_name"],
7979
)
80-
def test_custom_validation_open(tmp_path, schema_name, tree, expected_error):
80+
def test_custom_validation_open(tmp_path, schema_name, test_tree, expected_error):
8181
asdf_file = tmp_path / "out.asdf"
8282

83-
asdf.AsdfFile(tree).write_to(asdf_file)
83+
asdf.AsdfFile(test_tree).write_to(asdf_file)
8484
ctx = pytest.raises(ValidationError, match=expected_error) if expected_error else nullcontext()
8585

8686
with ctx, asdf.open(asdf_file, custom_schema=schema_name):
8787
pass
8888

8989

9090
@pytest.mark.parametrize(
91-
"schema_name, tree, expected_error",
91+
"schema_name, test_tree, expected_error",
9292
TEST_CASES,
9393
indirect=["schema_name"],
9494
)
95-
def test_custom_validation_validate(schema_name, tree, expected_error):
95+
def test_custom_validation_validate(schema_name, test_tree, expected_error):
9696

9797
ctx = pytest.raises(ValidationError, match=expected_error) if expected_error else nullcontext()
9898

9999
with ctx:
100-
asdf.AsdfFile(tree, custom_schema=schema_name).validate()
100+
asdf.AsdfFile(test_tree, custom_schema=schema_name).validate()
101101

102102

103103
@pytest.mark.parametrize(
104-
"schema_name, tree, expected_error",
104+
"schema_name, test_tree, expected_error",
105105
TEST_CASES,
106106
indirect=["schema_name"],
107107
)
108-
def test_custom_validation_dumps(schema_name, tree, expected_error):
108+
def test_custom_validation_dumps(schema_name, test_tree, expected_error):
109109

110110
ctx = pytest.raises(ValidationError, match=expected_error) if expected_error else nullcontext()
111111

112112
with ctx:
113-
asdf.dumps(tree, custom_schema=schema_name)
113+
asdf.dumps(test_tree, custom_schema=schema_name)
114114

115115

116116
@pytest.mark.parametrize(
117-
"schema_name, tree, expected_error",
117+
"schema_name, test_tree, expected_error",
118118
TEST_CASES,
119119
indirect=["schema_name"],
120120
)
121-
def test_custom_validation_loads(schema_name, tree, expected_error):
121+
def test_custom_validation_loads(schema_name, test_tree, expected_error):
122122

123-
contents = asdf.dumps(tree)
123+
contents = asdf.dumps(test_tree)
124124

125125
ctx = pytest.raises(ValidationError, match=expected_error) if expected_error else nullcontext()
126126

@@ -129,28 +129,28 @@ def test_custom_validation_loads(schema_name, tree, expected_error):
129129

130130

131131
@pytest.mark.parametrize(
132-
"schema_name, tree, expected_error",
132+
"schema_name, test_tree, expected_error",
133133
TEST_CASES,
134134
indirect=["schema_name"],
135135
)
136-
def test_custom_validation_dump(tmp_path, schema_name, tree, expected_error):
136+
def test_custom_validation_dump(tmp_path, schema_name, test_tree, expected_error):
137137
asdf_file = tmp_path / "out.asdf"
138138

139139
ctx = pytest.raises(ValidationError, match=expected_error) if expected_error else nullcontext()
140140

141141
with ctx:
142-
asdf.dump(tree, asdf_file, custom_schema=schema_name)
142+
asdf.dump(test_tree, asdf_file, custom_schema=schema_name)
143143

144144

145145
@pytest.mark.parametrize(
146-
"schema_name, tree, expected_error",
146+
"schema_name, test_tree, expected_error",
147147
TEST_CASES,
148148
indirect=["schema_name"],
149149
)
150-
def test_custom_validation_load(tmp_path, schema_name, tree, expected_error):
150+
def test_custom_validation_load(tmp_path, schema_name, test_tree, expected_error):
151151
asdf_file = tmp_path / "out.asdf"
152152

153-
asdf.AsdfFile(tree).write_to(asdf_file)
153+
asdf.AsdfFile(test_tree).write_to(asdf_file)
154154
ctx = pytest.raises(ValidationError, match=expected_error) if expected_error else nullcontext()
155155

156156
with ctx:

0 commit comments

Comments
 (0)