MCPcopy Create free account
hub / github.com/bspaans/python-mingus / add_composition

Method add_composition

mingus/containers/suite.py:41–53  ·  view source on GitHub ↗

Add a composition to the suite. Raise an UnexpectedObjectError when the supplied argument is not a Composition object.

(self, composition)

Source from the content-addressed store, hash-verified

39 pass
40
41 def add_composition(self, composition):
42 """Add a composition to the suite.
43
44 Raise an UnexpectedObjectError when the supplied argument is not a
45 Composition object.
46 """
47 if not hasattr(composition, "tracks"):
48 raise UnexpectedObjectError(
49 "Object '%s' not expected. Expecting "
50 "a mingus.containers.Composition object." % composition
51 )
52 self.compositions.append(composition)
53 return self
54
55 def set_author(self, author, email=""):
56 """Set the author of the suite."""

Callers 1

__add__Method · 0.95

Calls 1

Tested by

no test coverage detected