TestManager

digraph InheritanceGraph { graph [bgcolor=transparent, color=lightsteelblue2, fontname=Arial, fontsize=10, outputorder=edgesfirst, overlap=prism, penwidth=2, rankdir=LR, splines=spline, style="dashed, rounded", truecolor=true]; node [colorscheme=pastel19, fontname=Arial, fontsize=10, height=0, penwidth=2, shape=box, style="filled, rounded", width=0]; edge [color=lightslategrey, penwidth=1]; subgraph "cluster_abjad.system" { graph [label="abjad.system"]; node [color=1]; "abjad.system.AbjadObject.AbjadObject" [URL="../api/abjad/system/AbjadObject.html#abjad.system.AbjadObject.AbjadObject", label="Abjad\nObject", target=_top]; "abjad.system.TestManager.TestManager" [URL="../api/abjad/system/TestManager.html#abjad.system.TestManager.TestManager", color=black, fontcolor=white, label="Test\nManager", target=_top]; "abjad.system.AbjadObject.AbjadObject" -> "abjad.system.TestManager.TestManager"; } subgraph cluster_builtins { graph [label=builtins]; node [color=2]; "builtins.object" [URL="https://docs.python.org/3.6/library/functions.html#object", label=object, target=_top]; } "builtins.object" -> "abjad.system.AbjadObject.AbjadObject"; }

class abjad.system.TestManager.TestManager

Manages test logic.


Attributes Summary

compare Compares string_1 to string_2.
compare_files Compares file path_1 to file path_2.
compare_objects Compares object_one to object_two.
diff Gets diff of object_a and object_b formats.

Special methods

(AbjadObject).__format__(format_specification='')

Formats Abjad object.

Set format_specification to '' or 'storage'. Interprets '' equal to 'storage'.

Returns string.

(AbjadObject).__repr__()

Gets interpreter representation of Abjad object.

Returns string.


Class & static methods

static compare(string_1, string_2)

Compares string_1 to string_2.

Massage newlines.

Returns true or false.

static compare_files(path_1, path_2)

Compares file path_1 to file path_2.

For all file types:

* Performs line-by-line comparison
* Discards blank lines

For LilyPond files, additionally:

* Discards any LilyPond version statements
* Discards any lines beginning with ``%``

Returns true when files compare the same and false when files compare differently.

static compare_objects(object_one, object_two)

Compares object_one to object_two.

Returns true or false.

static diff(object_a, object_b, title=None)

Gets diff of object_a and object_b formats.

>>> one = abjad.Flute()
>>> two = abjad.BassFlute()
>>> diff = abjad.TestManager.diff(one, two, 'Diff:')
>>> print(diff)
Diff:
- abjad.Flute(
+ abjad.BassFlute(
?       ++++
-     name='flute',
+     name='bass flute',
?           +++++
-     short_name='fl.',
+     short_name='bass fl.',
?                 +++++
      markup=abjad.Markup(
-         contents=['Flute'],
?                    ^
+         contents=['Bass flute'],
?                    ^^^^^^
          ),
      short_markup=abjad.Markup(
-         contents=['Fl.'],
?                    ^
+         contents=['Bass fl.'],
?                    ^^^^^^
          ),
      allowable_clefs=('treble',),
      context='Staff',
-     middle_c_sounding_pitch=abjad.NamedPitch("c'"),
?                                              ^  -
+     middle_c_sounding_pitch=abjad.NamedPitch('c'),
?                                              ^
-     pitch_range=abjad.PitchRange('[C4, D7]'),
?                                     ^  ^^
+     pitch_range=abjad.PitchRange('[C3, C6]'),
?                                     ^  ^^
-     primary=True,
      )

Returns string.