Use assertAlmostEqual instead of failUnlessAlmostEqual in unit tests

Bug #1257068 reported by Sergio Cazzolato on 2013-12-02
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
Undecided
Sergio Cazzolato

Bug Description

The method failUnlessAlmostEqual has been deprecated since python 2.7.
http://docs.python.org/2/library/unittest.html#deprecated-aliases

Also in Python 3, a deprecated warning is raised when using failUnlessAlmostEqual therefore we should use assertAlmostEqual instead.

Changed in cinder:
assignee: nobody → Sergio Cazzolato (sergio-j-cazzolato)
description: updated

Fix proposed to branch: master
Review: https://review.openstack.org/59548

Changed in cinder:
status: New → In Progress

Reviewed: https://review.openstack.org/59548
Committed: http://github.com/openstack/cinder/commit/5896966d40884a7bdba2878386ef8f2966d08d1a
Submitter: Jenkins
Branch: master

commit 5896966d40884a7bdba2878386ef8f2966d08d1a
Author: Sergio Cazzolato <email address hidden>
Date: Fri Nov 29 00:38:44 2013 -0500

    Use assertAlmostEqual instead of failUnlessAlmostEqual in unit tests

    The method failUnlessAlmostEqual has been deprecated since python 2.7.
    http://docs.python.org/2/library/unittest.html#deprecated-aliases
    Also in Python 3, a deprecated warning is raised when using
    failUnlessAlmostEqual therefore we should use assertAlmostEqual instead.

    Change-Id: Ic9947028afdb5b1ba8f19103018a6f1bc3fc551f
    Closes-Bug: #1257068

Changed in cinder:
status: In Progress → Fix Committed
Thierry Carrez (ttx) on 2013-12-04
Changed in cinder:
milestone: none → icehouse-1
status: Fix Committed → Fix Released
Thierry Carrez (ttx) on 2014-04-17
Changed in cinder:
milestone: icehouse-1 → 2014.1
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers