Martin Blanchard pushed to branch mablanch/00-pylint-fix at BuildGrid / buildgrid
Commits:
-
144df7b0
by Martin Blanchard at 2018-11-26T10:23:32Z
2 changed files:
Changes:
| ... | ... | @@ -162,7 +162,7 @@ def test_bytestream_write_rejects_wrong_hash(mocked): |
| 162 | 162 |
servicer.Write(requests, context)
|
| 163 | 163 |
context.set_code.assert_called_once_with(grpc.StatusCode.INVALID_ARGUMENT)
|
| 164 | 164 |
|
| 165 |
- assert len(storage.data) is 0
|
|
| 165 |
+ assert not storage.data
|
|
| 166 | 166 |
|
| 167 | 167 |
|
| 168 | 168 |
@pytest.mark.parametrize("instance", instances)
|
| ... | ... | @@ -169,7 +169,7 @@ def test_list_operations_empty(instance, context): |
| 169 | 169 |
|
| 170 | 170 |
response = instance.ListOperations(request, context)
|
| 171 | 171 |
|
| 172 |
- assert len(response.operations) is 0
|
|
| 172 |
+ assert not response.operations
|
|
| 173 | 173 |
|
| 174 | 174 |
|
| 175 | 175 |
# Send execution off, delete, try to find operation should fail
|
| ... | ... | @@ -222,7 +222,7 @@ def test_cancel_operation(instance, controller, execute_request, context): |
| 222 | 222 |
request = operations_pb2.ListOperationsRequest(name=instance_name)
|
| 223 | 223 |
response = instance.ListOperations(request, context)
|
| 224 | 224 |
|
| 225 |
- assert len(response.operations) is 1
|
|
| 225 |
+ assert len(response.operations) == 1
|
|
| 226 | 226 |
|
| 227 | 227 |
for operation in response.operations:
|
| 228 | 228 |
operation_metadata = remote_execution_pb2.ExecuteOperationMetadata()
|
