Skip to content

Commit

Permalink
Stop assuming python3 naming in launch_testing PyTest action.
Browse files Browse the repository at this point in the history
Signed-off-by: Michel Hidalgo <michel@ekumenlabs.com>
  • Loading branch information
hidmic committed Mar 13, 2019
1 parent 315176e commit cec56d4
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions launch_testing/launch_testing/actions/pytest.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,9 @@

"""Module for the GTest action."""

import sys

from launch import SomeSubstitutionsType
from launch.substitutions import FindExecutable

from .test import Test

Expand All @@ -38,7 +39,7 @@ def __init__(
:param: path to the test to be executed.
"""
cmd = [FindExecutable(name='python3'), '-m', 'pytest', path]
cmd = [sys.executable, '-m', 'pytest', path]
super().__init__(cmd=cmd, **kwargs)
self.__path = path

Expand Down

0 comments on commit cec56d4

Please sign in to comment.