Commit bf17bdce authored by Matěj Cepl's avatar Matěj Cepl

Initial version uploaded to the Cheeseshop.

parent 8b7616af
*.py[ocw]
*~
pyyaml/upstream-repo/
MANIFEST
build/
dist/
0.1 2012-03-08
* Initial version: tests succeed
0.2 2012-03-08
* Just a packaging issue, don't play with strings too much in setup.py
version=yamlish.__version__ and that's it. No fancy formatting.
\ No newline at end of file
Based on Data-YAML version 0.0.6 (Copyright (C) 2007, Andy Armstrong), but it
is so thoroughly rewritten that I don't consider it derived work and I don't
feel the need to resolve what "This library is free software; you can
redistribute it and/or modify it under the same terms as Perl itself." actually
means.
YAMLish is a small subset of YAML that TAP producers may use to embed machine readable
information in TAP diagnostics. See TAP diagnostic syntax for information about how
YAMLish embeds in TAP.
----------------------------
Based on Data-YAML version 0.0.6 (Copyright (C) 2007, Andy Armstrong), but it
is so thoroughly rewritten that I don't consider it derived work and I don't
feel the need to resolve what "This library is free software; you can
redistribute it and/or modify it under the same terms as Perl itself." actually
means.
Whole this package is licensed under MIT/X11 license (see header of yamlish.py
for details).
# coding: utf-8
from __future__ import absolute_import, print_function, unicode_literals
from distutils.core import setup, Command
try:
import unittest2 as unittest
except ImportError:
import unittest
import os.path
import yamlish
class RunTests(Command):
"""New setup.py command to run all tests for the package.
"""
description = "run all tests for the package"
user_options = []
def initialize_options(self):
pass
def finalize_options(self):
pass
def run(self):
loader = unittest.TestLoader()
loader.discover('.')
suite = loader.suiteClass()
result = unittest.TestResult()
suite.run(result)
def read(fname):
with open(os.path.join(os.path.dirname(__file__), fname)) as inf:
return "\n" + inf.read().replace("\r\n", "\n")
# private
def get_long_description():
return read("README.txt") \
+ "\nChangelog:\n" + "=" * 10 + "\n" \
+ read("NEWS.txt")
setup(
name='yamlish',
version=yamlish.__version__,
description='Python implementation of YAMLish',
author='Matej Cepl',
author_email='mcepl@redhat.com',
url='https://gitorious.org/yamlish',
py_modules=['yamlish'],
long_description=get_long_description(),
keywords=['TAP', 'YAML', 'yamlish'],
cmdclass={'test': RunTests},
classifiers=[
"Programming Language :: Python",
"Development Status :: 4 - Beta",
"Environment :: Console",
"Intended Audience :: Information Technology",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Topic :: Software Development :: Libraries :: Python Modules",
"Topic :: Text Processing :: Markup",
]
)
......@@ -7,7 +7,6 @@ import yaml
import tempfile
import textwrap
from textwrap import dedent
logging.basicConfig(level=logging.INFO)
INPUT = 1
OUTPUT = 2
......@@ -28,9 +27,6 @@ def _create_input_test(test_src, tested_function):
Execute a test by calling a tested_function on test_src data.
"""
self.maxDiff = None
if ('skip' in test_src) and test_src['skip']:
logging.info("test_src skipped!")
return
got = ""
if 'error' in test_src:
......@@ -58,10 +54,6 @@ def _create_output_test(test_src, tested_function):
Execute a test by calling a tested_function on test_src data.
"""
self.maxDiff = None
if ('skip' in test_src) and test_src['skip']:
logging.info("test_src skipped!")
return
# We currently don't throw any exceptions in Writer, so this
# this is always false
......@@ -89,7 +81,7 @@ def generate_testsuite(test_data, test_case_shell, test_fce, direction=INPUT):
"""
for in_test in test_data:
if ('skip' in in_test) and in_test['skip']:
logging.info("test %s skipped!", in_test['name'])
logging.debug("test %s skipped!", in_test['name'])
continue
name = _generate_test_name(in_test['name'])
if direction == INPUT:
......
......@@ -113,7 +113,7 @@ Read more about TAP and YAMLish here: L<http://testanything.org/wiki>
import logging
import yaml
__version__ = "0.1"
__version__ = "0.2"
__author__ = "Matěj Cepl <mcepl_at_redhat_dot_com>"
class _YamlishLoader(yaml.loader.SafeLoader):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment