view tests/unit.py @ 19:cadc9514f60a

we have a legitimately failing test!
author Jeff Hammel <jhammel@mozilla.com>
date Mon, 26 Mar 2012 13:54:43 -0700
parents e00afe2c83bf
children 39f2611db9be
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_configuration(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)

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