Skip to content

Commit a45c72a

Browse files
dizcologychenyumic
authored and
chenyumic
committed
* detect-pdf update * update test
1 parent a45d042 commit a45c72a

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

samples/snippets/detect/detect_pdf_test.py

+5-2
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,17 @@
2525

2626

2727
def test_async_detect_document(capsys):
28+
storage_client = storage.Client()
29+
bucket = storage_client.get_bucket(BUCKET)
30+
assert len(list(bucket.list_blobs(prefix=OUTPUT_PREFIX))) == 0
31+
2832
async_detect_document(
2933
gcs_source_uri=GCS_SOURCE_URI,
3034
gcs_destination_uri=GCS_DESTINATION_URI)
3135
out, _ = capsys.readouterr()
3236

3337
assert 'Hodge conjecture' in out
38+
assert len(list(bucket.list_blobs(prefix=OUTPUT_PREFIX))) == 3
3439

35-
storage_client = storage.Client()
36-
bucket = storage_client.get_bucket(BUCKET)
3740
for blob in bucket.list_blobs(prefix=OUTPUT_PREFIX):
3841
blob.delete()
+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
google-cloud-vision==0.30.1
1+
google-cloud-vision==0.31.0
22
google-cloud-storage==1.6.0

0 commit comments

Comments
 (0)