Prepare for tests.
This doesn't add any actual tests but it should pave the way for that. Tests may be run like so: {{{ python setup.py nosetests --with-coverage }}}
This commit is contained in:
parent
844856f425
commit
4f34e6dddc
|
@ -28,11 +28,19 @@
|
||||||
|
|
||||||
import sys
|
import sys
|
||||||
import os.path
|
import os.path
|
||||||
import pyinotify
|
|
||||||
import threading
|
import threading
|
||||||
import Queue
|
import Queue
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
|
try:
|
||||||
|
import pyinotify
|
||||||
|
except ImportError:
|
||||||
|
# Mock out for testing on Windows.
|
||||||
|
class Dummy(object):
|
||||||
|
pass
|
||||||
|
pyinotify = Dummy()
|
||||||
|
pyinotify.ProcessEvent = Dummy
|
||||||
|
|
||||||
import edbob
|
import edbob
|
||||||
from edbob.daemon import Daemon
|
from edbob.daemon import Daemon
|
||||||
from edbob.errors import email_exception
|
from edbob.errors import email_exception
|
||||||
|
|
19
rattail/tests/__init__.py
Normal file
19
rattail/tests/__init__.py
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
|
||||||
|
import unittest
|
||||||
|
|
||||||
|
from pyramid import testing
|
||||||
|
|
||||||
|
|
||||||
|
class TestCase(unittest.TestCase):
|
||||||
|
"""
|
||||||
|
Base class for all test suites.
|
||||||
|
"""
|
||||||
|
|
||||||
|
def setUp(self):
|
||||||
|
self.config = testing.setUp()
|
||||||
|
|
||||||
|
def tearDown(self):
|
||||||
|
testing.tearDown()
|
||||||
|
|
||||||
|
def test_something(self):
|
||||||
|
self.assertTrue(1)
|
7
setup.cfg
Normal file
7
setup.cfg
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
[nosetests]
|
||||||
|
nocapture = 1
|
||||||
|
cover-package = rattail
|
||||||
|
cover-erase = 1
|
||||||
|
cover-inclusive = 1
|
||||||
|
cover-html = 1
|
||||||
|
cover-html-dir = htmlcov
|
2
setup.py
2
setup.py
|
@ -94,6 +94,8 @@ setup(
|
||||||
],
|
],
|
||||||
|
|
||||||
install_requires = requires,
|
install_requires = requires,
|
||||||
|
tests_require = requires + ['nose', 'coverage'],
|
||||||
|
test_suite = 'nose.collector',
|
||||||
|
|
||||||
namespace_packages = ['rattail'],
|
namespace_packages = ['rattail'],
|
||||||
packages = find_packages(),
|
packages = find_packages(),
|
||||||
|
|
Loading…
Reference in a new issue