Now running either,
$ python setup.py test
or
$ tox
will execute the test suite. (The former is deprecated, but is easier
for now, and most importantly doesn't require tox.)
+recursive-include test *
friendly_line = line
print(friendly_line)
friendly_line = line
print(friendly_line)
+
+ # Ensure that the pipe gets closed.
+ tai.communicate()
-from distutils.core import setup
+from setuptools import setup
setup(
name = 'djbdns-logparse',
setup(
name = 'djbdns-logparse',
keywords = 'djbdns, tinydns, dnscache',
scripts = ['bin/djbdns-logparse'],
packages = ['djbdns'],
keywords = 'djbdns, tinydns, dnscache',
scripts = ['bin/djbdns-logparse'],
packages = ['djbdns'],
- package_dir = {'djbdns': 'src/djbdns'},
+ package_dir = {'djbdns': 'djbdns'},
description = 'Convert tinydns and dnscache logs to human-readable form',
description = 'Convert tinydns and dnscache logs to human-readable form',
- license = 'doc/LICENSE'
+ test_suite = 'test.build_suite',
+ license = 'AGPLv3+'
--- /dev/null
+def build_suite():
+ from doctest import DocTestSuite
+ from unittest import TestSuite
+ import djbdns.common
+ import djbdns.dnscache
+ import djbdns.io
+ import djbdns.tinydns
+
+ tests = TestSuite()
+ tests.addTests(DocTestSuite(djbdns.common))
+ tests.addTests(DocTestSuite(djbdns.dnscache))
+ tests.addTests(DocTestSuite(djbdns.io))
+ tests.addTests(DocTestSuite(djbdns.tinydns))
+
+ return tests
--- /dev/null
+[testenv]
+commands =
+ python -m doctest -v djbdns/common.py
+ python -m doctest -v djbdns/dnscache.py
+ python -m doctest -v djbdns/io.py
+ python -m doctest -v djbdns/tinydns.py