From 173b56840849e88859f7a8ddba030260ec0d76ea Mon Sep 17 00:00:00 2001 From: Anthonios Partheniou Date: Tue, 19 Apr 2022 04:46:25 -0400 Subject: [PATCH 1/2] test: use == instead of is when comparing equality --- tests/unit/test_extended_operation.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/unit/test_extended_operation.py b/tests/unit/test_extended_operation.py index ad62b778..a4d39744 100644 --- a/tests/unit/test_extended_operation.py +++ b/tests/unit/test_extended_operation.py @@ -70,8 +70,8 @@ def make_extended_operation(responses=None): def test_constructor(): ex_op, refresh, _ = make_extended_operation() assert ex_op._extended_operation == refresh.responses[0] - assert ex_op.cancelled() is False - assert ex_op.done() is False + assert ex_op.cancelled() == False + assert ex_op.done() == False assert ex_op.name == TEST_OPERATION_NAME assert ex_op.status == CustomOperation.StatusCode.PENDING assert ex_op.error_code is None From 488a062e681569e7d380046be06e9d9919e8efd2 Mon Sep 17 00:00:00 2001 From: Anthonios Partheniou Date: Tue, 19 Apr 2022 04:54:59 -0400 Subject: [PATCH 2/2] use not instead of == --- tests/unit/test_extended_operation.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/unit/test_extended_operation.py b/tests/unit/test_extended_operation.py index a4d39744..c551bfa8 100644 --- a/tests/unit/test_extended_operation.py +++ b/tests/unit/test_extended_operation.py @@ -70,8 +70,8 @@ def make_extended_operation(responses=None): def test_constructor(): ex_op, refresh, _ = make_extended_operation() assert ex_op._extended_operation == refresh.responses[0] - assert ex_op.cancelled() == False - assert ex_op.done() == False + assert not ex_op.cancelled() + assert not ex_op.done() assert ex_op.name == TEST_OPERATION_NAME assert ex_op.status == CustomOperation.StatusCode.PENDING assert ex_op.error_code is None