Project

General

Profile

Actions

Bug #9417

closed

Some tests use assertTrue for value comparison

Added by Lucas Di Pentima almost 8 years ago. Updated almost 8 years ago.

Status:
Resolved
Priority:
Normal
Assigned To:
Category:
Tests
Target version:
Story points:
-

Description

Found that the tests at the RetryNeedsMultipleServices test case on file test_keep_client.py are using assertTrue to compare values instead of assertEqual. For example:

    def test_success_after_exception(self):
        with tutil.mock_keep_responses(
                'acbd18db4cc2f85cedef654fccc4a4d8+3',
                Exception('mock err'), 200, 200) as req_mock:
            self.keep_client.put('foo', num_retries=1, copies=2)
        self.assertTrue(3, req_mock.call_count)

Subtasks 1 (0 open1 closed)

Task #9418: Review 9417-asserttrue-for-value-comparisonResolvedBrett Smith06/15/2016Actions
Actions #1

Updated by Lucas Di Pentima almost 8 years ago

  • Status changed from New to In Progress

Commit 4fecfc75d5e1e6d783e9fa4cff5711654edd8716

Replaced assertTrue with assertEqual calls in RetryNeedsMultipleServices's tests.

Actions #2

Updated by Brett Smith almost 8 years ago

Kicked off a test run on Jenkins. As long as there are no new failures (as opposed to known racy tests, for example) this is good to merge.

This is a very small nit, but I noticed that the diff has this weird "delete a blank line," which is a little regrettable because that line provides the usual PEP 8 two blank lines after a class. It's not a huge deal, but if you could amend the patch to undo that before you merge, that would be nice. Either way, thanks.

Actions #3

Updated by Lucas Di Pentima almost 8 years ago

  • Status changed from In Progress to Resolved
  • % Done changed from 0 to 100

Applied in changeset arvados|commit:6617a2ba4323d2f47566c89961763625fce2e1ca.

Actions

Also available in: Atom PDF