def test_show_formats(self):
        with captured_stdout() as stdout:
            show_formats()

        # the output should be a header line + one line per format
        num_formats = len(ARCHIVE_FORMATS.keys())
        output = [line for line in stdout.getvalue().split("\n") if line.strip().startswith("--formats=")]
        self.assertEqual(len(output), num_formats)
Esempio n. 2
0
 def test_show_formats(self):
     with captured_stdout() as stdout:
         show_formats()
     num_formats = len(ARCHIVE_FORMATS.keys())
     output = [
         line for line in stdout.getvalue().split('\n')
         if line.strip().startswith('--formats=')
     ]
     self.assertEqual(len(output), num_formats)
Esempio n. 3
0
def show_formats():
    from distutils.fancy_getopt import FancyGetopt
    from distutils.archive_util import ARCHIVE_FORMATS
    formats = []
    for format in ARCHIVE_FORMATS.keys():
        formats.append(('formats=' + format, None, ARCHIVE_FORMATS[format][2]))

    formats.sort()
    FancyGetopt(formats).print_help('List of available source distribution formats:')
    return
Esempio n. 4
0
def show_formats():
    """Print all possible values for the 'formats' option (used by
    the "--help-formats" command-line option).
    """
    from distutils.fancy_getopt import FancyGetopt
    from distutils.archive_util import ARCHIVE_FORMATS

    formats = []
    for format in ARCHIVE_FORMATS.keys():
        formats.append(("formats=" + format, None, ARCHIVE_FORMATS[format][2]))
    formats.sort()
    FancyGetopt(formats).print_help("List of available source distribution formats:")
def show_formats():
    """Print all possible values for the 'formats' option (used by
    the "--help-formats" command-line option).
    """
    from distutils.fancy_getopt import FancyGetopt
    from distutils.archive_util import ARCHIVE_FORMATS
    formats = []
    for format in ARCHIVE_FORMATS.keys():
        formats.append(("formats=" + format, None, ARCHIVE_FORMATS[format][2]))
    formats.sort()
    FancyGetopt(formats).print_help(
        "List of available source distribution formats:")
Esempio n. 6
0
 def test_show_formats(self):
     with captured_stdout() as stdout:
         show_formats()
     num_formats = len(ARCHIVE_FORMATS.keys())
     output = [ line for line in stdout.getvalue().split('\n') if line.strip().startswith('--formats=') ]
     self.assertEqual(len(output), num_formats)
Esempio n. 7
0
"""distutils.command.sdist
Esempio n. 8
0
"""distutils.command.sdist