Ensure venv usage

This commit is contained in:
Marek Czernek 2024-07-22 14:42:22 +02:00 committed by Daniel Wozniak
parent 101a773df1
commit c0354fc161

View file

@ -1,4 +1,5 @@
import os
import sys
import pytest
@ -13,7 +14,7 @@ pytestmark = [
]
SALT_CALL_BINARY = "salt-call"
if os.environ.get("VIRTUAL_ENV"):
if os.environ.get("VIRTUAL_ENV") and os.environ.get("VIRTUAL_ENV") in sys.executable:
SALT_CALL_BINARY = f"{os.environ.get('VIRTUAL_ENV')}/bin/salt-call"