From 6e07f2e2cc5c1086630b79eed22521c6142ef5a6 Mon Sep 17 00:00:00 2001 From: ZiniuYu Date: Tue, 21 Feb 2023 12:02:17 +0800 Subject: [PATCH] fix: broken test image --- tests/test_asyncio.py | 2 +- tests/test_helper.py | 14 +++++++------- tests/test_ranker.py | 20 ++++++++++---------- tests/test_search.py | 4 ++-- tests/test_server.py | 12 ++++++------ tests/test_simple.py | 8 ++++---- tests/test_tensorrt.py | 6 +++--- 7 files changed, 33 insertions(+), 33 deletions(-) diff --git a/tests/test_asyncio.py b/tests/test_asyncio.py index cf3618be4..45d0e3669 100644 --- a/tests/test_asyncio.py +++ b/tests/test_asyncio.py @@ -26,7 +26,7 @@ async def test_async_encode(make_flow): DocumentArray( [ Document( - uri='https://docarray.jina.ai/_static/favicon.png', + uri='https://raw.githubusercontent.com/jina-ai/clip-as-service/main/docs/_static/favicon.png', text='hello, world', ), ] diff --git a/tests/test_helper.py b/tests/test_helper.py index acce92ad2..0845e6402 100644 --- a/tests/test_helper.py +++ b/tests/test_helper.py @@ -32,10 +32,10 @@ def test_numpy_softmax(shape, axis): Document(text='goodbye, world'), Document( text='hello, world', - uri='https://docarray.jina.ai/_static/favicon.png', + uri='https://raw.githubusercontent.com/jina-ai/clip-as-service/main/docs/_static/favicon.png', ), Document( - uri='https://docarray.jina.ai/_static/favicon.png', + uri='https://raw.githubusercontent.com/jina-ai/clip-as-service/main/docs/_static/favicon.png', ), ] ), @@ -47,14 +47,14 @@ def test_numpy_softmax(shape, axis): Document(text='hello, world'), Document(tensor=np.array([0, 1, 2])), Document( - uri='https://docarray.jina.ai/_static/favicon.png' + uri='https://raw.githubusercontent.com/jina-ai/clip-as-service/main/docs/_static/favicon.png' ).load_uri_to_blob(), Document( tensor=np.array([0, 1, 2]), - uri='https://docarray.jina.ai/_static/favicon.png', + uri='https://raw.githubusercontent.com/jina-ai/clip-as-service/main/docs/_static/favicon.png', ), Document( - uri='https://docarray.jina.ai/_static/favicon.png', + uri='https://raw.githubusercontent.com/jina-ai/clip-as-service/main/docs/_static/favicon.png', ), ] ), @@ -64,7 +64,7 @@ def test_numpy_softmax(shape, axis): DocumentArray( [ Document(text='hello, world'), - Document(uri='https://docarray.jina.ai/_static/favicon.png'), + Document(uri='https://raw.githubusercontent.com/jina-ai/clip-as-service/main/docs/_static/favicon.png'), ] ), (1, 1), @@ -86,7 +86,7 @@ def test_split_img_txt_da(inputs): DocumentArray( [ Document( - uri='https://docarray.jina.ai/_static/favicon.png', + uri='https://raw.githubusercontent.com/jina-ai/clip-as-service/main/docs/_static/favicon.png', ).load_uri_to_blob(), ] ) diff --git a/tests/test_ranker.py b/tests/test_ranker.py index 70f8165b3..23827513a 100644 --- a/tests/test_ranker.py +++ b/tests/test_ranker.py @@ -68,14 +68,14 @@ async def test_torch_executor_rank_text2imgs(encoder_class): [ [ Document( - uri='https://docarray.jina.ai/_static/favicon.png', + uri='https://raw.githubusercontent.com/jina-ai/clip-as-service/main/docs/_static/favicon.png', matches=[ Document(text='hello, world'), Document(text='goodbye, world'), ], ), Document( - uri='https://docarray.jina.ai/_static/favicon.png', + uri='https://raw.githubusercontent.com/jina-ai/clip-as-service/main/docs/_static/favicon.png', matches=[ Document(text='hello, world'), Document(text='goodbye, world'), @@ -85,14 +85,14 @@ async def test_torch_executor_rank_text2imgs(encoder_class): DocumentArray( [ Document( - uri='https://docarray.jina.ai/_static/favicon.png', + uri='https://raw.githubusercontent.com/jina-ai/clip-as-service/main/docs/_static/favicon.png', matches=[ Document(text='hello, world'), Document(text='goodbye, world'), ], ), Document( - uri='https://docarray.jina.ai/_static/favicon.png', + uri='https://raw.githubusercontent.com/jina-ai/clip-as-service/main/docs/_static/favicon.png', matches=[ Document(text='hello, world'), Document(text='goodbye, world'), @@ -102,7 +102,7 @@ async def test_torch_executor_rank_text2imgs(encoder_class): ), lambda: ( Document( - uri='https://docarray.jina.ai/_static/favicon.png', + uri='https://raw.githubusercontent.com/jina-ai/clip-as-service/main/docs/_static/favicon.png', matches=[ Document(text='hello, world'), Document(text='goodbye, world'), @@ -115,7 +115,7 @@ async def test_torch_executor_rank_text2imgs(encoder_class): Document( text='hello, world', matches=[ - Document(uri='https://docarray.jina.ai/_static/favicon.png'), + Document(uri='https://raw.githubusercontent.com/jina-ai/clip-as-service/main/docs/_static/favicon.png'), Document( uri=f'{os.path.dirname(os.path.abspath(__file__))}/img/00000.jpg' ), @@ -144,7 +144,7 @@ def test_docarray_inputs(make_flow, inputs): [ [ Document( - uri='https://docarray.jina.ai/_static/favicon.png', + uri='https://raw.githubusercontent.com/jina-ai/clip-as-service/main/docs/_static/favicon.png', matches=[ Document(text='hello, world'), Document(text='goodbye, world'), @@ -154,7 +154,7 @@ def test_docarray_inputs(make_flow, inputs): DocumentArray( [ Document( - uri='https://docarray.jina.ai/_static/favicon.png', + uri='https://raw.githubusercontent.com/jina-ai/clip-as-service/main/docs/_static/favicon.png', matches=[ Document(text='hello, world'), Document(text='goodbye, world'), @@ -164,7 +164,7 @@ def test_docarray_inputs(make_flow, inputs): ), lambda: ( Document( - uri='https://docarray.jina.ai/_static/favicon.png', + uri='https://raw.githubusercontent.com/jina-ai/clip-as-service/main/docs/_static/favicon.png', matches=[ Document(text='hello, world'), Document(text='goodbye, world'), @@ -177,7 +177,7 @@ def test_docarray_inputs(make_flow, inputs): Document( text='hello, world', matches=[ - Document(uri='https://docarray.jina.ai/_static/favicon.png'), + Document(uri='https://raw.githubusercontent.com/jina-ai/clip-as-service/main/docs/_static/favicon.png'), Document( uri=f'{os.path.dirname(os.path.abspath(__file__))}/img/00000.jpg' ), diff --git a/tests/test_search.py b/tests/test_search.py index 52dd15e4c..9c364953d 100644 --- a/tests/test_search.py +++ b/tests/test_search.py @@ -15,7 +15,7 @@ lambda: (Document(text='hello, world') for _ in range(10)), DocumentArray( [ - Document(uri='https://docarray.jina.ai/_static/favicon.png'), + Document(uri='https://raw.githubusercontent.com/jina-ai/clip-as-service/main/docs/_static/favicon.png'), Document( uri=f'{os.path.dirname(os.path.abspath(__file__))}/img/00000.jpg' ), @@ -52,7 +52,7 @@ def test_index_search(make_search_flow, inputs, limit): lambda: (Document(text='hello, world') for _ in range(10)), DocumentArray( [ - Document(uri='https://docarray.jina.ai/_static/favicon.png'), + Document(uri='https://raw.githubusercontent.com/jina-ai/clip-as-service/main/docs/_static/favicon.png'), Document( uri=f'{os.path.dirname(os.path.abspath(__file__))}/img/00000.jpg' ), diff --git a/tests/test_server.py b/tests/test_server.py index b5046baf0..66144566e 100644 --- a/tests/test_server.py +++ b/tests/test_server.py @@ -10,7 +10,7 @@ def test_server_download(tmpdir): download_model( - url='https://docarray.jina.ai/_static/favicon.png', + url='https://raw.githubusercontent.com/jina-ai/clip-as-service/main/docs/_static/favicon.png', target_folder=tmpdir, md5sum='66ea4817d73514888dcf6c7d2b00016d', with_resume=False, @@ -27,7 +27,7 @@ def test_server_download(tmpdir): os.remove(target_path) download_model( - url='https://docarray.jina.ai/_static/favicon.png', + url='https://raw.githubusercontent.com/jina-ai/clip-as-service/main/docs/_static/favicon.png', target_folder=tmpdir, md5sum='66ea4817d73514888dcf6c7d2b00016d', with_resume=True, @@ -40,7 +40,7 @@ def test_server_download(tmpdir): def test_server_download_md5(tmpdir, md5): if md5 != 'ABC': download_model( - url='https://docarray.jina.ai/_static/favicon.png', + url='https://raw.githubusercontent.com/jina-ai/clip-as-service/main/docs/_static/favicon.png', target_folder=tmpdir, md5sum=md5, with_resume=False, @@ -48,7 +48,7 @@ def test_server_download_md5(tmpdir, md5): else: with pytest.raises(Exception): download_model( - url='https://docarray.jina.ai/_static/favicon.png', + url='https://raw.githubusercontent.com/jina-ai/clip-as-service/main/docs/_static/favicon.png', target_folder=tmpdir, md5sum=md5, with_resume=False, @@ -58,7 +58,7 @@ def test_server_download_md5(tmpdir, md5): def test_server_download_not_regular_file(tmpdir): with pytest.raises(Exception): download_model( - url='https://docarray.jina.ai/_static/favicon.png', + url='https://raw.githubusercontent.com/jina-ai/clip-as-service/main/docs/_static/favicon.png', target_folder=tmpdir, md5sum='', with_resume=False, @@ -87,7 +87,7 @@ def test_make_onnx_flow_wrong_name_path(): 'image_uri', [ f'{os.path.dirname(os.path.abspath(__file__))}/img/00000.jpg', - 'https://docarray.jina.ai/_static/favicon.png', + 'https://raw.githubusercontent.com/jina-ai/clip-as-service/main/docs/_static/favicon.png', ], ) @pytest.mark.parametrize('size', [224, 288, 384, 448]) diff --git a/tests/test_simple.py b/tests/test_simple.py index 8611395f4..24e2bcad3 100644 --- a/tests/test_simple.py +++ b/tests/test_simple.py @@ -35,7 +35,7 @@ def test_protocols(port_generator, protocol, jit, pytestconfig): ('hello, world', 'goodbye, world'), lambda: ('hello, world' for _ in range(10)), [ - 'https://docarray.jina.ai/_static/favicon.png', + 'https://raw.githubusercontent.com/jina-ai/clip-as-service/main/docs/_static/favicon.png', f'{os.path.dirname(os.path.abspath(__file__))}/img/00000.jpg', 'hello, world', ], @@ -58,7 +58,7 @@ def test_plain_inputs(make_flow, inputs): lambda: (Document(text='hello, world') for _ in range(10)), DocumentArray( [ - Document(uri='https://docarray.jina.ai/_static/favicon.png'), + Document(uri='https://raw.githubusercontent.com/jina-ai/clip-as-service/main/docs/_static/favicon.png'), Document( uri=f'{os.path.dirname(os.path.abspath(__file__))}/img/00000.jpg' ), @@ -90,7 +90,7 @@ def test_docarray_inputs(make_flow, inputs): DocumentArray( [ Document( - uri='https://docarray.jina.ai/_static/favicon.png', + uri='https://raw.githubusercontent.com/jina-ai/clip-as-service/main/docs/_static/favicon.png', text='hello, world', ), ] @@ -117,7 +117,7 @@ def test_docarray_preserve_original_inputs(make_flow, inputs): DocumentArray( [ Document( - uri='https://docarray.jina.ai/_static/favicon.png', + uri='https://raw.githubusercontent.com/jina-ai/clip-as-service/main/docs/_static/favicon.png', text='hello, world', ), ] diff --git a/tests/test_tensorrt.py b/tests/test_tensorrt.py index 7752073bb..6f17cc184 100644 --- a/tests/test_tensorrt.py +++ b/tests/test_tensorrt.py @@ -17,7 +17,7 @@ lambda: (Document(text='hello, world') for _ in range(10)), DocumentArray( [ - Document(uri='https://docarray.jina.ai/_static/favicon.png'), + Document(uri='https://raw.githubusercontent.com/jina-ai/clip-as-service/main/docs/_static/favicon.png'), Document( uri=f'{os.path.dirname(os.path.abspath(__file__))}/img/00000.jpg' ), @@ -47,13 +47,13 @@ def test_docarray_inputs(make_trt_flow, inputs): 'd', [ Document( - uri='https://docarray.jina.ai/_static/favicon.png', + uri='https://raw.githubusercontent.com/jina-ai/clip-as-service/main/docs/_static/favicon.png', matches=[Document(text='hello, world'), Document(text='goodbye, world')], ), Document( text='hello, world', matches=[ - Document(uri='https://docarray.jina.ai/_static/favicon.png'), + Document(uri='https://raw.githubusercontent.com/jina-ai/clip-as-service/main/docs/_static/favicon.png'), Document( uri=f'{os.path.dirname(os.path.abspath(__file__))}/img/00000.jpg' ),