Add a composition to the suite. Raise an UnexpectedObjectError when the supplied argument is not a Composition object.
(self, composition)
| 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.""" |
no test coverage detected