diff --git a/python/Makefile b/python/Makefile index 7df67b09..a22023f2 100644 --- a/python/Makefile +++ b/python/Makefile @@ -29,4 +29,4 @@ doctest: ## Run documentation tests. .PHONY: test test: ## Run tests. - pytest python/tests -vv --durations=10 -m "not slow" + pytest python/tests -vv --durations=10 -m "not slow and not s3_test" diff --git a/python/python/tests/test_embeddings.py b/python/python/tests/test_embeddings.py index 4fbc263b..fe794103 100644 --- a/python/python/tests/test_embeddings.py +++ b/python/python/tests/test_embeddings.py @@ -341,6 +341,7 @@ def test_add_optional_vector(tmp_path): assert not (np.abs(tbl.to_pandas()["vector"][0]) < 1e-6).all() +@pytest.mark.slow @pytest.mark.parametrize( "embedding_type", [ diff --git a/python/python/tests/test_remote_db.py b/python/python/tests/test_remote_db.py index 280e0f10..746ca2e9 100644 --- a/python/python/tests/test_remote_db.py +++ b/python/python/tests/test_remote_db.py @@ -32,15 +32,16 @@ def make_mock_http_handler(handler): @contextlib.contextmanager def mock_lancedb_connection(handler): with http.server.HTTPServer( - ("localhost", 8080), make_mock_http_handler(handler) + ("localhost", 0), make_mock_http_handler(handler) ) as server: + port = server.server_address[1] handle = threading.Thread(target=server.serve_forever) handle.start() db = lancedb.connect( "db://dev", api_key="fake", - host_override="http://localhost:8080", + host_override=f"http://localhost:{port}", client_config={ "retry_config": {"retries": 2}, "timeout_config": { @@ -59,15 +60,16 @@ def mock_lancedb_connection(handler): @contextlib.asynccontextmanager async def mock_lancedb_connection_async(handler, **client_config): with http.server.HTTPServer( - ("localhost", 8080), make_mock_http_handler(handler) + ("localhost", 0), make_mock_http_handler(handler) ) as server: + port = server.server_address[1] handle = threading.Thread(target=server.serve_forever) handle.start() db = await lancedb.connect_async( "db://dev", api_key="fake", - host_override="http://localhost:8080", + host_override=f"http://localhost:{port}", client_config={ "retry_config": {"retries": 2}, "timeout_config": {