All checks were successful
Container Image / build-and-push (push) Successful in 22s
26 lines
637 B
Python
26 lines
637 B
Python
import json
|
|
import os
|
|
import subprocess
|
|
import sys
|
|
|
|
|
|
def test_integrations_import_does_not_initialize_core_package():
|
|
env = dict(os.environ)
|
|
env["PYTHONPATH"] = os.getcwd()
|
|
code = (
|
|
"import json, sys; "
|
|
"import src.integrations; "
|
|
"import src.secret_storage; "
|
|
"print(json.dumps({'core_loaded': 'core' in sys.modules}))"
|
|
)
|
|
result = subprocess.run(
|
|
[sys.executable, "-c", code],
|
|
cwd=os.getcwd(),
|
|
env=env,
|
|
text=True,
|
|
capture_output=True,
|
|
timeout=10,
|
|
check=True,
|
|
)
|
|
assert json.loads(result.stdout) == {"core_loaded": False}
|