Source code for tests.standard_logging
#!/local/bin/python
'''
-------------------
standard_logging.py
-------------------
This module tests the :py:class:`logging.Logger` instance returned by
:ref:`standard_logging.py <standard_logging_autodocs>` with a variety of
options and choices. These tests use the standard `unittest <http://docs.python
.org/2/library/unittest.html>`_ package and extend the
:py:class:`unittest.TestCase` class.
.. moduleauthor:: Nick Schurch <nschurch@dundee.ac.uk>
:module_version: 1.0
:created_on: 2013-04-08
'''
__version__ = "1.0"
import unittest, os, tempfile, shutil, warnings
import script_logging.standard_logging as sl
[docs]class TestStandardLogging(unittest.TestCase):
''' Test the functions defined in :ref:`standard_logging.py
<standard_logging_autodocs>`.
A standard :py:class:`logging.Logger` instance is created from a
call to :ref:`standard_logging <standard_logging_autodocs>` and then is
tested with different sets of arguments.
'''
[docs] def setUp(self):
''' Initialize the framework for testing.
Creates a new logger.
'''
self.logger = sl.standard_logger()
[docs] def tearDown(self):
''' Remove testing framework.'''
pass
[docs] def test_standard_parser_infile(self):
''' Test the logger
================= ==========================
Test object Expectation
================= ==========================
something something
================= ==========================
'''
if __name__ == '__main__':
unittest.main()