Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:smarty12:Python
python-pytest-profiling
pytest-fixtures-pr171-remove-mock.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File pytest-fixtures-pr171-remove-mock.patch of Package python-pytest-profiling
diff --git a/pytest-profiling/tests/unit/test_profile.py b/pytest-profiling/tests/unit/test_profile.py index 616c4c6..614422e 100644 --- a/tests/unit/test_profile.py +++ b/tests/unit/test_profile.py @@ -8,7 +8,12 @@ reload_module(pytest_profiling) from pytest_profiling import Profiling, pytest_addoption, pytest_configure -from mock import Mock, ANY, patch, sentinel + +try: + from unittest.mock import Mock, ANY, patch, sentinel +except ImportError: + # python 2 + from mock import Mock, ANY, patch, sentinel def test_creates_prof_dir():
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor