[AUR-361] Setup pre-commit, pytest, GitHub actions, ssh-secret (#3)
Co-authored-by: trducng <trungduc1992@gmail.com>
This commit is contained in:
@@ -29,11 +29,14 @@ def clean_artifacts_for_telemetry():
|
||||
def test_disable_telemetry_import_haystack_first():
|
||||
"""Test that telemetry is disabled when kotaemon lib is initiated after"""
|
||||
import os
|
||||
|
||||
import haystack.telemetry
|
||||
|
||||
assert haystack.telemetry.telemetry is not None
|
||||
assert os.environ.get("HAYSTACK_TELEMETRY_ENABLED", "True") != "False"
|
||||
|
||||
import kotaemon # noqa: F401
|
||||
import kotaemon # noqa: F401
|
||||
|
||||
assert haystack.telemetry.telemetry is None
|
||||
assert os.environ.get("HAYSTACK_TELEMETRY_ENABLED", "True") == "False"
|
||||
|
||||
@@ -43,8 +46,9 @@ def test_disable_telemetry_import_haystack_after_kotaemon():
|
||||
"""Test that telemetry is disabled when kotaemon lib is initiated before"""
|
||||
import os
|
||||
|
||||
import kotaemon # noqa: F401
|
||||
import haystack.telemetry
|
||||
|
||||
import kotaemon # noqa: F401
|
||||
|
||||
assert haystack.telemetry.telemetry is None
|
||||
assert os.environ.get("HAYSTACK_TELEMETRY_ENABLED", "True") == "False"
|
||||
|
||||
|
Reference in New Issue
Block a user