mirror of
https://github.com/donnemartin/data-science-ipython-notebooks.git
synced 2024-03-22 13:30:56 +08:00
Renamed Util class to TypeUtil to be more descriptive.
This commit is contained in:
parent
c2ddddcdcd
commit
125f5c0c81
|
@ -1,13 +1,13 @@
|
|||
from nose.tools import assert_equal
|
||||
from pydatasnippets.core.type_util import Util
|
||||
from pydatasnippets.core.type_util import TypeUtil
|
||||
|
||||
|
||||
class TestUtil():
|
||||
|
||||
def test_is_iterable(self):
|
||||
assert_equal(Util.is_iterable('foo'), True)
|
||||
assert_equal(Util.is_iterable(7), False)
|
||||
assert_equal(TypeUtil.is_iterable('foo'), True)
|
||||
assert_equal(TypeUtil.is_iterable(7), False)
|
||||
|
||||
def test_convert_to_list(self):
|
||||
assert_equal(isinstance(Util.convert_to_list('foo'), list), True)
|
||||
assert_equal(isinstance(Util.convert_to_list(7), list), False)
|
||||
assert_equal(isinstance(TypeUtil.convert_to_list('foo'), list), True)
|
||||
assert_equal(isinstance(TypeUtil.convert_to_list(7), list), False)
|
|
@ -1,4 +1,4 @@
|
|||
class Util:
|
||||
class TypeUtil:
|
||||
|
||||
@classmethod
|
||||
def is_iterable(cls, obj):
|
||||
|
|
Loading…
Reference in New Issue
Block a user