test only one instance of same type

Signed-off-by: Steven Armstrong <steven@icarus.ethz.ch>
This commit is contained in:
Steven Armstrong 2011-10-07 22:50:11 +02:00
parent 73bdb7f11f
commit 5d59102018
1 changed files with 6 additions and 0 deletions

View File

@ -32,6 +32,12 @@ fixtures = op.join(my_dir, 'fixtures')
class TypeTestCase(unittest.TestCase):
def test_only_one_instance(self):
base_path = fixtures
cdist_type1 = cdist.core.Type(base_path, '__name_path')
cdist_type2 = cdist.core.Type(base_path, '__name_path')
self.assertEqual(id(cdist_type1), id(cdist_type2))
def test_name(self):
base_path = fixtures
cdist_type = cdist.core.Type(base_path, '__name_path')