- always use unittest2 - remove unneeded boilerplate - disable pypy3 in travis, as its currently broken
18 lines
541 B
Python
18 lines
541 B
Python
import funcsigs
|
|
|
|
import unittest2 as unittest
|
|
|
|
class TestFormatAnnotation(unittest.TestCase):
|
|
def test_string (self):
|
|
self.assertEqual(funcsigs.formatannotation("annotation"),
|
|
"'annotation'")
|
|
|
|
def test_builtin_type (self):
|
|
self.assertEqual(funcsigs.formatannotation(int),
|
|
"int")
|
|
|
|
def test_user_type (self):
|
|
class dummy (object): pass
|
|
self.assertEqual(funcsigs.formatannotation(dummy),
|
|
"tests.test_formatannotation.dummy")
|