Skip to content

Commit

Permalink
Fix flake8 warnings in launch_yaml. (#756)
Browse files Browse the repository at this point in the history
We don't need parentheses after assert.  This fixes
warnings when using the new flake8.

Signed-off-by: Chris Lalancette <[email protected]>
  • Loading branch information
clalancette authored Jan 26, 2024
1 parent 57f3d3b commit 94e159d
Showing 1 changed file with 11 additions and 12 deletions.
23 changes: 11 additions & 12 deletions launch_yaml/test/launch_yaml/test_executable.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,23 +46,22 @@ def test_executable():
ld = parser.parse_description(root_entity)
executable = ld.entities[0]
cmd = [i[0].perform(None) for i in executable.cmd]
assert(
cmd == ['ls', '-l', '-a', '-s'])
assert(executable.cwd[0].perform(None) == '/')
assert(executable.name[0].perform(None) == 'my_ls')
assert(executable.shell is True)
assert(executable.emulate_tty is True)
assert(executable.output[0].perform(None) == 'log')
assert(executable.sigkill_timeout[0].perform(None) == '4.0')
assert(executable.sigterm_timeout[0].perform(None) == '7.0')
assert cmd == ['ls', '-l', '-a', '-s']
assert executable.cwd[0].perform(None) == '/'
assert executable.name[0].perform(None) == 'my_ls'
assert executable.shell is True
assert executable.emulate_tty is True
assert executable.output[0].perform(None) == 'log'
assert executable.sigkill_timeout[0].perform(None) == '4.0'
assert executable.sigterm_timeout[0].perform(None) == '7.0'
key, value = executable.additional_env[0]
key = key[0].perform(None)
value = value[0].perform(None)
assert(key == 'var')
assert(value == '1')
assert key == 'var'
assert value == '1'
ls = LaunchService()
ls.include_launch_description(ld)
assert(0 == ls.run())
assert 0 == ls.run()


def test_executable_on_exit():
Expand Down

0 comments on commit 94e159d

Please sign in to comment.