I am using nosetest tools for asserting a python unittest
:
...
from nose.tools import assert_equals, assert_almost_equalclass TestPolycircles(unittest.TestCase):def setUp(self):self.latitude = 32.074322self.longitude = 34.792081self.radius_meters = 100self.number_of_vertices = 36self.vertices = polycircles.circle(latitude=self.latitude,longitude=self.longitude,radius=self.radius_meters,number_of_vertices=self.number_of_vertices)def test_number_of_vertices(self):"""Asserts that the number of vertices in the approximation polygonmatches the input."""assert_equals(len(self.vertices), self.number_of_vertices)...
When I run python setup.py test
, I get a deprecation warning:
...
Asserts that the number of vertices in the approximation polygon ...
/Users/adamatan/personal/polycircles/polycircles/test/test_polycircles.py:22:
DeprecationWarning: Please use assertEqual instead.assert_equals(len(self.vertices), self.number_of_vertices)
ok
...
I could not find any assertEqual
in nose tools. Where is this warning coming from, and how can I fix it?