aboutsummaryrefslogtreecommitdiffstats
path: root/setup.py
diff options
context:
space:
mode:
authorMatěj Cepl <mcepl@redhat.com>2012-03-08 23:29:28 +0100
committerMatěj Cepl <mcepl@redhat.com>2012-03-08 23:29:28 +0100
commit884614e79eb99d216eb998a4ca9f504e07667a5f (patch)
treeff7de8943b83eaa1e92137cb5ea5e8206c7de78e /setup.py
parentbf17bdcec33de1b1218849134ed7ae468f75e946 (diff)
downloadyamlish-884614e79eb99d216eb998a4ca9f504e07667a5f.tar.gz
Don't leak tempfiles (and setup.py test should actually do something).0.3
Diffstat (limited to 'setup.py')
-rw-r--r--setup.py18
1 files changed, 6 insertions, 12 deletions
diff --git a/setup.py b/setup.py
index 9dad10d..f4b2acb 100644
--- a/setup.py
+++ b/setup.py
@@ -1,10 +1,7 @@
# 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 unittest2 as unittest
import os.path
import yamlish
@@ -22,16 +19,13 @@ class RunTests(Command):
pass
def run(self):
- loader = unittest.TestLoader()
- loader.discover('.')
- suite = loader.suiteClass()
- result = unittest.TestResult()
- suite.run(result)
+ tests = unittest.TestLoader().discover('.')
+ runner = unittest.TextTestRunner()
+ runner.run(tests)
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") \
@@ -40,9 +34,9 @@ def get_long_description():
setup(
name='yamlish',
- version=yamlish.__version__,
+ version=str(yamlish.__version__),
description='Python implementation of YAMLish',
- author='Matej Cepl',
+ author='Matěj Cepl',
author_email='mcepl@redhat.com',
url='https://gitorious.org/yamlish',
py_modules=['yamlish'],