music21.test.testDocumentation

Module to test all the code excerpts in the .rst files in the music21 documentation and those generated by Jupyter Notebook.

Run only on PY3. Documentation only is designed to run there.

Functions

music21.test.testDocumentation.getDocumentationFiles(runOne=False)

returns a list of namedtuples for each module that should be run

>>> from music21.test import testDocumentation
>>> testDocumentation.getDocumentationFiles()
[ModTuple(module='index.rst', fullModulePath='...music21/documentation/autogenerated/index.rst', 
moduleNoExtension='index', autoGen=False),
..., 
ModTuple(module='usersGuide_03_pitches.rst', 
  fullModulePath='...music21/documentation/autogenerated/usersGuide/usersGuide_03_pitches.rst', 
   moduleNoExtension='usersGuide_03_pitches', autoGen=True),
...]
music21.test.testDocumentation.getDocumentationFromAutoGen(fullModulePath)
music21.test.testDocumentation.main(runOne=False)

ModTuple

class music21.test.testDocumentation.ModTuple(module, fullModulePath, moduleNoExtension, autoGen)

ModTuple read-only properties

ModTuple.autoGen

Alias for field number 3

ModTuple.fullModulePath

Alias for field number 1

ModTuple.module

Alias for field number 0

ModTuple.moduleNoExtension

Alias for field number 2

NoOutput

class music21.test.testDocumentation.NoOutput(streamSave)

NoOutput methods

NoOutput.release()
NoOutput.write(data)

Unbuffered

class music21.test.testDocumentation.Unbuffered(stream)

Unbuffered methods

Unbuffered.write(data)