tmt/cli.py
def convert(context, paths, makefile, nitrate, purpose, **kwargs):
    """
    Convert old test metadata into the new fmf format.

    Accepts one or more directories where old metadata are stored.
    By default all available sources and current directory are used.
    The following test metadata are converted for each source:

    \b
    makefile ..... summary, component, duration
    purpose ...... description
    nitrate ...... environment, relevancy
    """
    tmt.Test._context = context
    if not paths:
        paths = ['.']
    for path in paths:
        # Make sure we've got a real directory
        path = os.path.realpath(path)
        if not os.path.isdir(path):
            raise tmt.utils.GeneralError(
                "Path '{0}' is not a directory.".format(path))
        # Gather old metadata and store them as fmf
        data = tmt.convert.read(path, makefile, nitrate, purpose)
        tmt.convert.write(path, data)

    Convert old test metadata into the new fmf format.

    Accepts one or more directories where old metadata are stored.
    By default all available sources and current directory are used.
    The following test metadata are converted for each source:

    \b
    makefile ..... summary, component, duration
    purpose ...... description
    nitrate ...... environment, relevancy
    
Convert old test metadata into the new fmf format.
Accepts one or more directories where old metadata are stored.
By default all available sources and current directory are used.
The following test metadata are converted for each source.


Convert old test metadata into the new fmf format . Accepts one or more directories where old metadata are stored . By default all available sources and current directory are used . The following test metadata are converted for each source .
def convert(context, paths, makefile, nitrate, purpose, **kwargs):
    tmt.Test._context = context
    if not paths:
        paths = ['.']
    for path in paths:
        path = os.path.realpath(path)
        if not os.path.isdir(path):
            raise tmt.utils.GeneralError(
                "Path '{0}' is not a directory.".format(path))
        data = tmt.convert.read(path, makefile, nitrate, purpose)
        tmt.convert.write(path, data)
def convert ( context , paths , makefile , nitrate , purpose , ** kwargs ) : tmt . Test . _context = context if not paths : paths = [ '.' ] for path in paths : path = os . path . realpath ( path ) if not os . path . isdir ( path ) : raise tmt . utils . GeneralError ( "Path '{0}' is not a directory." . format ( path ) ) data = tmt . convert . read ( path , makefile , nitrate , purpose ) tmt . convert . write ( path , data )
Convert old test metadata into the new fmf format.
Convert old test metadata into the new fmf format .
"""
    Convert old test metadata into the new fmf format.

    Accepts one or more directories where old metadata are stored.
    By default all available sources and current directory are used.
    The following test metadata are converted for each source:

    \b
    makefile ..... summary, component, duration
    purpose ...... description
    nitrate ...... environment, relevancy
    """ # Make sure we've got a real directory # Gather old metadata and store them as fmf
context
paths
makefile
nitrate
purpose