Skip to content

Commit ad9bb21

Browse files
authored
Add tests, bump version for 0.4.1 (#290)
1 parent 8c97668 commit ad9bb21

File tree

5 files changed

+27
-5
lines changed

5 files changed

+27
-5
lines changed

README.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1-
<div align="center" style="margin-bottom: 20px;">
2-
<div><img src="https://raw.githubusercontent.com/redis/redis-vl-python/main/docs/_static/Redis_Logo_Red_RGB.svg" style="max-width: 200px; margin-bottom: 20px;"></div>
1+
<div align="center" dir="auto">
2+
<img width="300" src="https://raw.githubusercontent.com/redis/redis-vl-python/main/docs/_static/Redis_Logo_Red_RGB.svg" style="max-width: 100%" alt="Redis">
33
<h1>🔥 Vector Library</h1>
44
</div>
55

6+
67
<div align="center" style="margin-top: 20px;">
78
<span style="display: block; margin-bottom: 10px;">The *AI-native* Redis Python client</span>
89
<br />

pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "redisvl"
3-
version = "0.4.0"
3+
version = "0.4.1"
44
description = "Python client library and CLI for using Redis as a vector database"
55
authors = ["Redis Inc. <[email protected]>"]
66
license = "MIT"

redisvl/version.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "0.4.0"
1+
__version__ = "0.4.1"

tests/integration/test_async_search_index.py

+14
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,20 @@ async def test_search_index_from_existing(async_client, async_index):
8080
assert async_index2.schema == async_index.schema
8181

8282

83+
@pytest.mark.asyncio
84+
async def test_search_index_from_existing_url(async_index, redis_url):
85+
await async_index.create(overwrite=True)
86+
87+
try:
88+
async_index2 = await AsyncSearchIndex.from_existing(
89+
async_index.name, redis_url=redis_url
90+
)
91+
except Exception as e:
92+
pytest.skip(str(e))
93+
94+
assert async_index2.schema == async_index.schema
95+
96+
8397
@pytest.mark.asyncio
8498
async def test_search_index_from_existing_complex(async_client):
8599
schema = {

tests/integration/test_search_index.py

+8-1
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ def test_search_index_from_dict(index_from_dict):
7373
assert index_from_dict.key("foo").startswith(index_from_dict.prefix)
7474

7575

76-
def test_search_index_from_existing(client, index):
76+
def test_search_index_from_existing(index, client):
7777
index.create(overwrite=True)
7878

7979
try:
@@ -176,6 +176,13 @@ def test_search_index_set_client(async_client, redis_url, index_schema):
176176
assert index.client is None
177177

178178

179+
def test_search_index_connect(index, redis_url):
180+
with warnings.catch_warnings():
181+
warnings.filterwarnings("ignore", category=DeprecationWarning)
182+
index.connect(redis_url=redis_url)
183+
assert index.client
184+
185+
179186
def test_search_index_create(index):
180187
index.create(overwrite=True, drop=True)
181188
assert index.exists()

0 commit comments

Comments
 (0)