Skip to content

Commit

Permalink
Don't hardcode the python executable
Browse files Browse the repository at this point in the history
Sometimes (Fedora minimal buildroot) the python command isn't
available, only python3 command is.
  • Loading branch information
FrostyX authored and elParaguayo committed Nov 3, 2024
1 parent d0873ed commit ef1b2c9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion test/widget/test_scriptexit.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
import logging
import sys
import tempfile
from pathlib import Path

Expand All @@ -43,8 +44,9 @@ def read_file(fname):

@pytest.fixture(scope="function")
def temp_output():
python = sys.executable
with tempfile.TemporaryDirectory() as tempdir:
yield f"python {WINDOW} {tempdir}/exit.log"
yield f"{python} {WINDOW} {tempdir}/exit.log"


@pytest.fixture(scope="function")
Expand Down

0 comments on commit ef1b2c9

Please sign in to comment.