Upgrade pytest to 6.0.2 (#39959)

Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
This commit is contained in:
Franck Nijhof 2020-09-15 10:09:56 +02:00 committed by GitHub
parent 8236394b85
commit 5d0fa1417e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 12 additions and 8 deletions

View File

@ -21,7 +21,7 @@ pytest-test-groups==1.0.3
pytest-sugar==0.9.4
pytest-timeout==1.4.2
pytest-xdist==1.32.0
pytest==5.4.3
pytest==6.0.2
requests_mock==1.8.0
responses==0.12.0
stdlib-list==0.7.0

View File

@ -56,6 +56,10 @@ class MockDysonState(DysonPureHotCoolState):
def __init__(self):
"""Create new Mock Dyson State."""
def __repr__(self):
"""Mock repr because original one fails since constructor not called."""
return "<MockDysonState>"
def _get_config():
"""Return a config dictionary."""

View File

@ -38,6 +38,10 @@ class MockDysonState(DysonPureCoolState):
"""Create new Mock Dyson State."""
pass
def __repr__(self):
"""Mock repr because original one fails since constructor not called."""
return "<MockDysonState>"
def _get_dyson_purecool_device():
"""Return a valid device as provided by the Dyson web services."""

View File

@ -54,12 +54,8 @@ async def test_sensor_availability(
# sensor has no more prices, state is "unavailable" from now on
await _process_time_step(hass, mock_data, value="unavailable")
await _process_time_step(hass, mock_data, value="unavailable")
num_errors = sum(
1 for x in caplog.get_records("call") if x.levelno == logging.ERROR
)
num_warnings = sum(
1 for x in caplog.get_records("call") if x.levelno == logging.WARNING
)
num_errors = sum(1 for x in caplog.records if x.levelno == logging.ERROR)
num_warnings = sum(1 for x in caplog.records if x.levelno == logging.WARNING)
assert num_warnings == 1
assert num_errors == 0
assert pvpc_aioclient_mock.call_count == 9

View File

@ -106,7 +106,7 @@ class MockNode(MagicMock):
def __init__(
self,
*,
node_id="567",
node_id=567,
name="Mock Node",
manufacturer_id="ABCD",
product_id="123",