def list_all_supriya_classes(bases=None):
    r'''Lists all supriya classes.
    '''
    classes = documentationtools.list_all_classes(modules='supriya.tools')
    if bases:
        classes = tuple(_ for _ in classes if issubclass(_, bases))
    classes = sorted(classes, key=lambda x: x.__module__)
    classes = tuple(classes)
    return classes
Example #2
0
def list_all_supriya_classes(bases=None):
    """
    Lists all supriya classes.
    """
    classes = documentationtools.list_all_classes(modules='supriya.tools')
    if bases:
        classes = tuple(_ for _ in classes if issubclass(_, bases))
    classes = sorted(classes, key=lambda x: x.__module__)
    classes = tuple(classes)
    return classes
Example #3
0
def list_all_scoremanager_classes(modules=None):
    r'''Lists all public classes defined in Abjad.

    ::

        >>> all_classes = documentationtools.list_all_scoremanager_classes()

    '''
    from abjad.tools import documentationtools
    return documentationtools.list_all_classes('scoremanager')
Example #4
0
def list_all_experimental_classes(modules=None):
    r'''Lists all public classes defined in the Abjad experimental branch.

    ::

        >>> all_classes = documentationtools.list_all_experimental_classes()  # doctest: +SKIP

    '''
    from abjad.tools import documentationtools
    return documentationtools.list_all_classes('experimental')
Example #5
0
def list_all_ide_classes(modules=None):
    r'''Lists all public classes defined in Abjad IDE.

    ::

        >>> all_classes = documentationtools.list_all_ide_classes()  # doctest: +SKIP

    '''
    from abjad.tools import documentationtools
    return documentationtools.list_all_classes('ide')
def list_all_experimental_classes(modules=None, ignored_classes=None):
    r"""Lists all public classes defined in the Abjad experimental branch.

    ::

        >>> all_classes = documentationtools.list_all_experimental_classes()  # doctest: +SKIP

    """
    from abjad.tools import documentationtools

    return documentationtools.list_all_classes(modules="experimental", ignored_classes=ignored_classes)
def list_all_experimental_classes(modules=None):
    r"""Lists all public classes defined in the Abjad experimental branch.

    ::

        >>> all_classes = documentationtools.list_all_experimental_classes()

    """
    from abjad.tools import documentationtools

    return documentationtools.list_all_classes("experimental")
def list_all_abjad_classes(modules=None, ignored_classes=None):
    r'''Lists all public classes defined in Abjad.

    ::

        >>> all_classes = documentationtools.list_all_abjad_classes()

    '''
    from abjad.tools import documentationtools
    return documentationtools.list_all_classes(
        modules='abjad',
        ignored_classes=ignored_classes,
        )
Example #9
0
def list_all_ide_classes(modules=None, ignored_classes=None):
    r'''Lists all public classes defined in Abjad IDE.

    ::

        >>> all_classes = documentationtools.list_all_ide_classes()  # doctest: +SKIP

    '''
    from abjad.tools import documentationtools
    return documentationtools.list_all_classes(
        modules='ide',
        ignored_classes=ignored_classes,
    )
Example #10
0
def list_all_experimental_classes(modules=None, ignored_classes=None):
    r'''Lists all public classes defined in the Abjad experimental branch.

    ::

        >>> all_classes = documentationtools.list_all_experimental_classes()  # doctest: +SKIP

    '''
    from abjad.tools import documentationtools
    try:
        return documentationtools.list_all_classes(
            modules='experimental',
            ignored_classes=ignored_classes,
        )
    except ImportError:
        return []
def list_all_experimental_classes(modules=None, ignored_classes=None):
    r'''Lists all public classes defined in the Abjad experimental branch.

    ::

        >>> all_classes = documentationtools.list_all_experimental_classes()  # doctest: +SKIP

    '''
    from abjad.tools import documentationtools
    try:
        return documentationtools.list_all_classes(
            modules='experimental',
            ignored_classes=ignored_classes,
            )
    except ImportError:
        return []
Example #12
0
def list_all_ide_classes(modules=None, ignored_classes=None):
    r'''Lists all public classes defined in Abjad IDE.

    ::

        >>> all_classes = documentationtools.list_all_ide_classes()  # doctest: +SKIP

    '''
    from abjad.tools import documentationtools
    try:
        return documentationtools.list_all_classes(
            modules='ide',
            ignored_classes=ignored_classes,
            )
    except ImportError:
        return []
import abjad
import inspect
import pickle
import pytest
from abjad.tools import documentationtools


_classes_to_fix = ()

classes = documentationtools.list_all_classes('consort')
@pytest.mark.parametrize('class_', classes)
def test_consort___pickle___01(class_):
    r'''All storage-formattable classes are pickable.
    '''

    if ('_storage_format_specification' not in dir(class_) or
        '_get_format_specification' not in dir(class_)):
        return
    if inspect.isabstract(class_):
        return
    if class_ in _classes_to_fix:
        return
    instance_one = class_()
    pickle_string = pickle.dumps(instance_one)
    instance_two = pickle.loads(pickle_string)
    instance_one_format = format(instance_one, 'storage')
    instance_two_format = format(instance_two, 'storage')
    assert instance_one_format == instance_two_format
Example #14
0
 def _list_maker_classes(self):
     modules = self._list_maker_modules()
     classes = documentationtools.list_all_classes(
         modules=modules)
     return classes
Example #15
0
 def _list_maker_classes(self):
     modules = self._list_maker_modules()
     classes = documentationtools.list_all_classes(modules=modules)
     return classes