Commits

Jonathan Eunice committed 9dfd52e

now passing all tests under 2.6

Comments (0)

Files changed (4)

 Good options for the separator might be be '-', '=', or parts of the `Unicode 
 box drawing character set <http://en.wikipedia.org/wiki/Box-drawing_character>`_.
 
-Python 3
-========
+Python 3 RSN
+============
 
-``say`` is intended to work across late-model versions of Python 2 and 3. It is
-most tested at Python 2.7 and Python 3.3.
+``say`` is intended to work across late-model versions of Python 2. It
+passes all tests under Python 2.6 and 2.7, but not yet Python 3.  
 
+When that does work...
 One benefit of having a printing function that isn't defined as a statement in
 Python 2 but a function in Python 3, and that doesn't require ``from __future__
 import`` statements that only work in Python 2 is better cross-version
 ``say`` attempts to mask some of the quirky compexities of the 2-to-3 divide,
 such as string encodings and codec use.
 
-That said, the author works mostly in Python 2.7 and is not yet expert at
-cross-supporting both language versions. Cross-compatibility is therefore
-"evovling."
-
 Alternatives
 ============
 
 ==============
 
  * A problem that prevented good operation under Python 2.6 has been fixed.
-   All tests pass under 2.6.7.
+   All tests pass under 2.6.7. Automated multi-version testing using
+   ``py.test`` and ``tox`` has commenced.
 
 Installation
 ============
+[pytest]
+python_files = test/*.py
         for (literal_text, field_name, format_spec, conversion) in sformatter.parse(arg):
             parts.append(literal_text)
             if field_name is not None:
-                format_str = six.u("{0") + ("!" + conversion if conversion else "") + \
+                format_str = six.u("{0exit") + ("!" + conversion if conversion else "") + \
                                           (":" + format_spec if format_spec else "") + "}"
                 field_value = seval(field_name)
                 formatted = format_str.format(field_value)
 #! /usr/bin/env python
 from setuptools import setup
+from setuptools.command.test import test as TestCommand
+import sys
 
 def verno(s):
     """
     # The double-mention of l.strip() is yet another fine example of why
     # Python needs en passant aliasing.
 
+class Tox(TestCommand):
+    def finalize_options(self):
+        TestCommand.finalize_options(self)
+        self.test_args = []
+        self.test_suite = True
+    def run_tests(self):
+        #import here, cause outside the eggs aren't loaded
+        import tox
+        errno = tox.cmdline(self.test_args)
+        sys.exit(errno)
+
 setup(
     name='say',
-    version=verno("0.188"),
+    version=verno("0.198"),
     author='Jonathan Eunice',
     author_email='jonathan.eunice@gmail.com',
     description='Simple formatted printing with templates',
     url='https://bitbucket.org/jeunice/say',
     py_modules=['say'],
     install_requires=['six','options','otherstuf'],
-    tests_require = ['pytest'],
+    tests_require = ['tox', 'pytest'],
+    cmdclass = {'test': Tox},
     zip_safe = True,
     keywords='print format template say',
     classifiers=linelist("""
         License :: OSI Approved :: BSD License
         Intended Audience :: Developers
         Programming Language :: Python
+        Programming Language :: Python :: 2.6
+        Programming Language :: Python :: 2.7
         Topic :: Software Development :: Libraries :: Python Modules
     """)
 )