Skip to content

Commit

Permalink
avoid deprecation warning, use from_parent (#141)
Browse files Browse the repository at this point in the history
Signed-off-by: Dirk Thomas <dirk-thomas@users.noreply.github.com>
  • Loading branch information
dirk-thomas committed Apr 16, 2020
1 parent f485d3e commit e07c9f3
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions launch_testing_ros/launch_testing_ros/pytest/hooks.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,18 @@
class LaunchROSTestItem(LaunchTestItem):

def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs, runner_cls=LaunchTestRunner)
super().__init__(*args, **kwargs)

@classmethod
def from_parent(cls, *args, **kwargs):
kwargs['runner_cls'] = LaunchTestRunner
return super().from_parent(*args, **kwargs)


class LaunchROSTestModule(LaunchTestModule):

def makeitem(self, *args, **kwargs):
return LaunchROSTestItem(*args, **kwargs)
return LaunchROSTestItem.from_parent(*args, **kwargs)


def pytest_launch_collect_makemodule(path, parent, entrypoint):
Expand Down

0 comments on commit e07c9f3

Please sign in to comment.