forked from mirrors/gecko-dev
MozReview-Commit-ID: 5qfK6OygVMH --HG-- rename : third_party/python/pytest/_pytest/vendored_packages/pluggy-0.4.0.dist-info/LICENSE.txt => third_party/python/pluggy/LICENSE rename : third_party/python/pytest/doc/en/example/costlysetup/sub1/__init__.py => third_party/python/pytest/doc/en/example/costlysetup/sub_a/__init__.py rename : third_party/python/pytest/doc/en/example/costlysetup/sub1/__init__.py => third_party/python/pytest/doc/en/example/costlysetup/sub_b/__init__.py rename : third_party/python/pytest/_pytest/_code/__init__.py => third_party/python/pytest/src/_pytest/_code/__init__.py extra : rebase_source : d80873f2b1899decefbddddfc2f69ae045925b81
17 lines
541 B
Python
17 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")
|