Skip to content
This repository has been archived by the owner on Nov 13, 2024. It is now read-only.

Bug fix - E2E test cleared the Tokenizer but haven't re-set #175

Merged
merged 1 commit into from
Nov 15, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions tests/e2e/test_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ def knowledge_base(index_name):
def client(knowledge_base, index_name):
index_name_before = os.getenv("INDEX_NAME")
os.environ["INDEX_NAME"] = index_name
tokenizer_before = Tokenizer._tokenizer_instance
Tokenizer.clear()
with TestClient(app) as client:
client.base_url = f"{client.base_url}/{API_VERSION}"
Expand All @@ -71,6 +72,7 @@ def client(knowledge_base, index_name):
os.environ["INDEX_NAME"] = index_name_before
else:
os.unsetenv("INDEX_NAME")
Tokenizer.initialize(tokenizer_before.__class__)


@pytest.fixture(scope="module", autouse=True)
Expand Down