Skip to content

Commit

Permalink
Skip a test rather than passing when not on Ubuntu (#962)
Browse files Browse the repository at this point in the history
  • Loading branch information
cottsay authored May 3, 2024
1 parent 9698c4a commit 24dfe4e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion test/test_rosdep_installers.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
from unittest.mock import Mock, patch
except ImportError:
from mock import Mock, patch
from unittest import SkipTest
import os
import sys
try:
Expand Down Expand Up @@ -615,7 +616,7 @@ def test_RosdepInstaller_install_resolved(mock_geteuid):
except OSError as e:
if str(e).count('[Errno 2] No such file or directory') == 0:
raise
return True
raise SkipTest('targets ubuntu systems only')
stdout_lines = [x.strip() for x in stdout.getvalue().split('\n') if x.strip()]
assert len(stdout_lines) == 3
assert stdout_lines[0] == '#[apt] Installation commands:'
Expand Down

0 comments on commit 24dfe4e

Please sign in to comment.