You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
from unittest import mock
import sure
@mock.patch('my_thing_to_mock', return_value=True) # Anything will work
def my_test(my_mock):
assert True == True # Don't even need to use sure
When I execute tests:
pytest
I will then receive an error like:
@mock.patch('my_thing_to_mock', return_value=True) # Anything will work
def my_test(my_mock):
E fixture 'my_mock' not found
> available fixtures: cache, capfd, capsys, cov, doctest_namespace, monkeypatch, pytestconfig, record_xml_property, recwarn, tmpdir, tmpdir_factory
> use 'pytest --fixtures [testpath]' for help on them.
I believe this is tied to sure's dependency on mock==2.0.0 my understanding from Mock is that mock is now part of the Python standard library, available as unittest.mock in Python 3.3 onwards..
Since sure supports > 3.3 up to 3.7 I would expect that unittest.mock would be supported. However I could be doing it wrong! :D
The text was updated successfully, but these errors were encountered:
Issue Type
BUG
Versions & Configuration
Sure: 1.4.11
Python: 3.6.3
Operating System: Mac
Steps to reproduce (Expected and Actual Results)
Write a test like:
When I execute tests:
I will then receive an error like:
I believe this is tied to sure's dependency on
mock==2.0.0
my understanding from Mock is thatmock is now part of the Python standard library, available as unittest.mock in Python 3.3 onwards.
.Since
sure
supports > 3.3 up to 3.7 I would expect that unittest.mock would be supported. However I could be doing it wrong! :DThe text was updated successfully, but these errors were encountered: