Skip to content

Commit

Permalink
pep8 + import order (#157)
Browse files Browse the repository at this point in the history
  • Loading branch information
mikaelarguedas authored Aug 5, 2017
1 parent ac67079 commit 1618ed7
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 9 deletions.
7 changes: 4 additions & 3 deletions composition/test/test_composition.py.in
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,13 @@ def test_dlopen_composition():
server_library = '@SERVER_LIBRARY@'
client_library = '@CLIENT_LIBRARY@'
output_file = '@EXPECTED_OUTPUT_ALL@'
launch(name, [executable, talker_library, listener_library, server_library, client_library], output_file)
launch(
name,
[executable, talker_library, listener_library, server_library, client_library],
output_file)


def test_api_pubsub_composition():
import sys
name = 'test_api_composition'
executable = '@API_COMPOSITION_EXECUTABLE@'
additional_processes = [
Expand All @@ -76,7 +78,6 @@ def test_api_pubsub_composition():


def test_api_srv_composition():
import sys
name = 'test_api_composition'
executable = '@API_COMPOSITION_EXECUTABLE@'
additional_processes = [
Expand Down
2 changes: 2 additions & 0 deletions demo_nodes_cpp/test/test_executables_tutorial.py.in
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
# generated code does not contain a copyright notice

import os

from launch import LaunchDescriptor
from launch.exit_handler import ignore_exit_handler
from launch.exit_handler import primary_ignore_returncode_exit_handler
Expand Down Expand Up @@ -58,5 +59,6 @@ def test_executable():
for handler in output_handlers:
handler.check()


if __name__ == '__main__':
test_executable()
1 change: 1 addition & 0 deletions image_tools/test/test_executables_demo.py.in
Original file line number Diff line number Diff line change
Expand Up @@ -94,5 +94,6 @@ def _test_executables(publisher_executable_args, subscriber_executable_args):
for handler in output_handlers:
handler.check()


if __name__ == '__main__':
test_reliable_qos()
2 changes: 2 additions & 0 deletions intra_process_demo/test/test_executables_demo.py.in
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
# generated code does not contain a copyright notice

import os

from launch import LaunchDescriptor
from launch.exit_handler import ignore_exit_handler
from launch.launcher import DefaultLauncher
Expand Down Expand Up @@ -43,5 +44,6 @@ def test_executable():
for handler in output_handlers:
handler.check()


if __name__ == '__main__':
test_executable()
10 changes: 7 additions & 3 deletions pendulum_control/test/test_pendulum_demo.py.in
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,10 @@ def test_executable():
pendulum_logger_executable = '@RCLCPP_DEMO_PENDULUM_LOGGER_EXECUTABLE@'
pendulum_logger_output_file = '@RCLCPP_DEMO_PENDULUM_LOGGER_EXPECTED_OUTPUT@'
pendulum_logger_name = 'pendulum_logger'
pendulum_logger_handler = create_handler(pendulum_logger_name, launch_descriptor, pendulum_logger_output_file)
assert pendulum_logger_handler, 'Cannot find appropriate handler for %s' % pendulum_logger_output_file
pendulum_logger_handler = create_handler(
pendulum_logger_name, launch_descriptor, pendulum_logger_output_file)
assert pendulum_logger_handler, \
'Cannot find appropriate handler for %s' % pendulum_logger_output_file
output_handlers.append(pendulum_logger_handler)
launch_descriptor.add_process(
cmd=[pendulum_logger_executable],
Expand All @@ -51,7 +53,8 @@ def test_executable():
pendulum_demo_name, launch_descriptor, pendulum_demo_output_file,
filtered_prefixes=filtered_prefixes,
filtered_rmw_implementation=rmw_implementation)
assert pendulum_demo_handler, 'Cannot find appropriate handler for %s' % pendulum_demo_output_file
assert pendulum_demo_handler, \
'Cannot find appropriate handler for %s' % pendulum_demo_output_file
output_handlers.append(pendulum_demo_handler)
launch_descriptor.add_process(
cmd=[pendulum_demo_executable, '-i', '1000'],
Expand All @@ -70,5 +73,6 @@ def test_executable():
for handler in output_handlers:
handler.check()


if __name__ == '__main__':
test_executable()
10 changes: 7 additions & 3 deletions pendulum_control/test/test_pendulum_teleop.py.in
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,10 @@ def test_executable():
pendulum_demo_executable = '@RCLCPP_DEMO_PENDULUM_DEMO_EXECUTABLE@'
pendulum_demo_output_file = '@RCLCPP_DEMO_PENDULUM_DEMO_TELEOP_EXPECTED_OUTPUT@'
pendulum_demo_name = 'pendulum_demo'
pendulum_demo_handler = create_handler(pendulum_demo_name, launch_descriptor, pendulum_demo_output_file)
assert pendulum_demo_handler, 'Cannot find appropriate handler for %s' % pendulum_demo_output_file
pendulum_demo_handler = create_handler(
pendulum_demo_name, launch_descriptor, pendulum_demo_output_file)
assert pendulum_demo_handler, \
'Cannot find appropriate handler for %s' % pendulum_demo_output_file
output_handlers.append(pendulum_demo_handler)
launch_descriptor.add_process(
cmd=[pendulum_demo_executable, '-i', '0'],
Expand All @@ -52,7 +54,8 @@ def test_executable():
pendulum_teleop_name, launch_descriptor, pendulum_teleop_output_file,
filtered_prefixes=filtered_prefixes,
filtered_rmw_implementation=rmw_implementation)
assert pendulum_teleop_handler, 'Cannot find appropriate handler for %s' % pendulum_teleop_output_file
assert pendulum_teleop_handler, \
'Cannot find appropriate handler for %s' % pendulum_teleop_output_file
output_handlers.append(pendulum_teleop_handler)
execute_with_delay_command = os.path.join(
os.path.abspath(os.path.dirname(__file__)), 'execute_with_delay.py')
Expand All @@ -75,5 +78,6 @@ def test_executable():
for handler in output_handlers:
handler.check()


if __name__ == '__main__':
test_executable()

0 comments on commit 1618ed7

Please sign in to comment.