这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@hroncok
Copy link
Contributor

@hroncok hroncok commented Oct 17, 2022

Summary of changes

Consistently use unittest.mock in tests

  • Some tests used unittest.mock from the standard library
  • Some tests used mock from PyPI
  • Some tests tried to import unittest.mock with a fallback to mock (the import never fails on Python 3.7+, older Pythons are not supported)

Pull Request Checklist

 - Some tests used unittest.mock from the standard library
 - Some tests used mock from PyPI
 - Some tests tried to import unittest.mock with a fallback to mock
   (the import never fails on Python 3.7+, older Pythons are not supported)
@hroncok hroncok marked this pull request as ready for review October 20, 2022 12:07
Copy link
Member

@webknjaz webknjaz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Personally, I'd prefer relying on the pytest's built-in monkeypatch fixture and the pytest-mock package. But I think this is already a great first step towards consistency.

@jaraco jaraco merged commit 484fedb into pypa:main Oct 21, 2022
@hroncok hroncok deleted the mock branch October 21, 2022 09:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants