Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use the newer unittest.mock from standard library on Python 3 #1193

Open
wants to merge 1 commit into
base: noetic-devel
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@
<build_export_depend condition="$ROS_PYTHON_VERSION == 3">python3-nose</build_export_depend>

<test_depend condition="$ROS_PYTHON_VERSION == 2">python-mock</test_depend>
<test_depend condition="$ROS_PYTHON_VERSION == 3">python3-mock</test_depend>
<test_depend condition="$ROS_PYTHON_VERSION == 2">python-nose</test_depend>
<test_depend condition="$ROS_PYTHON_VERSION == 3">python3-nose</test_depend>

Expand Down
5 changes: 4 additions & 1 deletion test/unit_tests/test_environment_cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@
import tempfile
import unittest

from mock import Mock
try:
from unittest.mock import Mock
except ImportError:
from mock import Mock

try:
import catkin.environment_cache
Expand Down
5 changes: 4 additions & 1 deletion test/unit_tests/test_find_in_workspace.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@
import tempfile
import unittest

from mock import Mock
try:
from unittest.mock import Mock
except ImportError:
from mock import Mock

try:
import catkin
Expand Down
5 changes: 4 additions & 1 deletion test/unit_tests/test_parse_package_xml.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@
import tempfile
import unittest

from mock import Mock
try:
from unittest.mock import Mock
except ImportError:
from mock import Mock

imp.load_source('parse_package_xml',
os.path.join(os.path.dirname(__file__),
Expand Down