view tests/unit.py @ 24:39f2611db9be

rename a bunch of things and begin to work on the sanity of validation
author Jeff Hammel <jhammel@mozilla.com>
date Mon, 26 Mar 2012 15:46:25 -0700
parents cadc9514f60a
children b39e550402ea
line wrap: on
line source

#!/usr/bin/env python

"""
unit tests
"""

import os
import sys
import unittest

from example import ExampleConfiguration # example configuration to test

# globals
here = os.path.dirname(os.path.abspath(__file__))

class ConfigurationUnitTest(unittest.TestCase):

    def test_cli(self):
        example = ExampleConfiguration()

        # parse command line arguments
        options, args = example.parse(['-a', 'ts', '--develop', '-e', '/home/jhammel/bin/firefox'])
        self.assertEqual(bool(args), False) # no arguments
        self.assertEqual(options.develop, True)
        self.assertEqual(options.activeTests, 'ts')

if __name__ == '__main__':
    unittest.main()