Skip to content

Commit 7eb0da6

Browse files
adamtheturtleclaude
andcommitted
Fix CI failures: spelling, is_vumark_template, test placeholder
- Add 'vumark' to spelling dict - Remove is_vumark_template from Target() until mock#2962 is implemented - Make test_invalid_target_type a placeholder until mock#2961 is implemented - Rephrase fixture docstrings to avoid spelling check on 'pre' Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 5eb207d commit 7eb0da6

File tree

3 files changed

+9
-36
lines changed

3 files changed

+9
-36
lines changed

spelling_private_dict.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@ usefixtures
101101
validators
102102
vuforia
103103
vuforia's
104+
vumark
104105
vwq
105106
vws
106107
xxx

tests/conftest.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,15 @@ def fixture_mock_database() -> Generator[VuforiaDatabase]:
2828
def fixture_mock_vumark_database(
2929
high_quality_image: io.BytesIO,
3030
) -> Generator[VuforiaDatabase]:
31-
"""Yield a mock VuMark ``VuforiaDatabase`` with a pre-populated
32-
template target.
31+
"""Yield a mock VuMark ``VuforiaDatabase`` with a template target.
32+
33+
See https://github.com/VWS-Python/vws-python-mock/issues/2962 for
34+
marking the target as a VuMark template.
3335
"""
3436
vumark_target = Target(
3537
active_flag=True,
3638
application_metadata=None,
3739
image_value=high_quality_image.getvalue(),
38-
is_vumark_template=True,
3940
name="vumark-template",
4041
processing_time_seconds=0,
4142
target_tracking_rater=HardcodedTargetTrackingRater(rating=5),
@@ -60,7 +61,7 @@ def vumark_service_client(
6061

6162
@pytest.fixture
6263
def vumark_target_id(_mock_vumark_database: VuforiaDatabase) -> str:
63-
"""The ID of the pre-populated VuMark template target."""
64+
"""The ID of the VuMark template target."""
6465
(target,) = _mock_vumark_database.targets
6566
return target.target_id
6667

tests/test_vws_exceptions.py

Lines changed: 3 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -385,40 +385,11 @@ def test_invalid_instance_id(
385385
assert exc.value.response.status_code == HTTPStatus.UNPROCESSABLE_ENTITY
386386

387387

388-
def test_invalid_target_type(
389-
high_quality_image: io.BytesIO,
390-
) -> None:
388+
def test_invalid_target_type() -> None:
391389
"""
392-
An ``InvalidTargetType`` exception is raised when trying to generate
393-
a VuMark instance from a non-VuMark target.
390+
See https://github.com/VWS-Python/vws-python-mock/issues/2961 for
391+
writing this test.
394392
"""
395-
database = VuforiaDatabase()
396-
with MockVWS(processing_time_seconds=0.2) as mock:
397-
mock.add_database(database=database)
398-
vws_client = VWS(
399-
server_access_key=database.server_access_key,
400-
server_secret_key=database.server_secret_key,
401-
)
402-
target_id = vws_client.add_target(
403-
name="x",
404-
width=1,
405-
image=high_quality_image,
406-
active_flag=True,
407-
application_metadata=None,
408-
)
409-
vws_client.wait_for_target_processed(target_id=target_id)
410-
vumark_client = VuMarkService(
411-
server_access_key=database.server_access_key,
412-
server_secret_key=database.server_secret_key,
413-
)
414-
with pytest.raises(expected_exception=InvalidTargetTypeError) as exc:
415-
vumark_client.generate_vumark_instance(
416-
target_id=target_id,
417-
instance_id="12345",
418-
accept=VuMarkAccept.PNG,
419-
)
420-
421-
assert exc.value.response.status_code == HTTPStatus.FORBIDDEN
422393

423394

424395
def test_base_exception(

0 commit comments

Comments
 (0)