mirror of
https://github.com/donnemartin/data-science-ipython-notebooks.git
synced 2024-03-22 13:30:56 +08:00
24 lines
706 B
Python
24 lines
706 B
Python
from nose.tools import assert_equal
|
|
|
|
|
|
class TestUtil():
|
|
|
|
@classmethod
|
|
def setup_class(cls):
|
|
"""This method is run once for each class before any tests are run"""
|
|
|
|
@classmethod
|
|
def teardown_class(cls):
|
|
"""This method is run once for each class _after_ all tests are run"""
|
|
|
|
def setUp(self):
|
|
"""This method is run once before _each_ test method is executed"""
|
|
|
|
def teardown(self):
|
|
"""This method is run once after _each_ test method is executed"""
|
|
|
|
def test_isinstance(self):
|
|
assert_equal(isinstance(7, (int)), True)
|
|
assert_equal(isinstance(7.5, (int, float)), True)
|
|
assert_equal(isinstance('foo', (int, float, str)), True)
|