Skip to content

Commit ac954c1

Browse files
committed
Passing doctest
1 parent a853cde commit ac954c1

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

docs/source/index.rst

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ To write unit tests for code which uses this library, without using your Vuforia
6666
.. testcode::
6767

6868
import io
69+
import pathlib
6970

7071
from mock_vws.database import VuforiaDatabase
7172
from mock_vws import MockVWS
@@ -83,15 +84,17 @@ To write unit tests for code which uses this library, without using your Vuforia
8384
client_secret_key=database.client_secret_key,
8485
)
8586

86-
name = 'my_image_name'
8787

88-
with open('/path/to/image.png', 'rb') as my_image_file:
88+
image = pathlib.Path('high_quality_image.jpg').resolve()
89+
with image.open(mode='rb') as my_image_file:
8990
my_image = io.BytesIO(my_image_file.read())
9091

9192
target_id = vws_client.add_target(
92-
name=name,
93+
name="example_image_name",
9394
width=1,
9495
image=my_image,
96+
application_metadata=None,
97+
active_flag=True,
9598
)
9699

97100
There are some differences between the mock and the real Vuforia.

0 commit comments

Comments
 (0)