Skip to content

Commit

Permalink
Update various "colour.utilities.tests.tests_metadata" unit tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
KelSolaar committed Jul 13, 2016
1 parent f4104b0 commit 09c4eaf
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions colour/utilities/tests/tests_metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -224,18 +224,26 @@ def test_set_metadata(self):
"""

@set_metadata(Metadata, 'Lambda', '$\Lambda$')
def f():
def f1():
"""
Dummy function for unit tests.
"""

pass

self.assertTrue(hasattr(f, '__metadata__'))
self.assertTrue(hasattr(f1, '__metadata__'))

m = Metadata('Gamma', '$\Gamma$')

@set_metadata(m)
def f():
def f2():
"""
Dummy function for unit tests.
"""

pass

self.assertIs(f.__metadata__, m)
self.assertIs(f2.__metadata__, m)


if __name__ == '__main__':
Expand Down

0 comments on commit 09c4eaf

Please sign in to comment.