Skip to content

Commit

Permalink
fix: unit tests env will need clear too (#11445)
Browse files Browse the repository at this point in the history
Signed-off-by: yihong0618 <[email protected]>
  • Loading branch information
yihong0618 authored Dec 9, 2024
1 parent 4d7cfd0 commit 7ff42b1
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions api/tests/unit_tests/configs/test_dify_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,11 @@ def test_dify_config_undefined_entry(example_env_file):
assert config["LOG_LEVEL"] == "INFO"


# NOTE: If there is a `.env` file in your Workspace, this test might not succeed as expected.
# This is due to `pymilvus` loading all the variables from the `.env` file into `os.environ`.
def test_dify_config(example_env_file):
# clear system environment variables
os.environ.clear()
# load dotenv file with pydantic-settings
config = DifyConfig(_env_file=example_env_file)

Expand Down

0 comments on commit 7ff42b1

Please sign in to comment.