Example #1
0
    def test_add(self):

        options = Options.Options()
        options.add("file",
                    accept=str,
                    value="jasyscript.py",
                    help="Use the given jasy script")
        self.assertEqual(options.__getattr__("file"), 'jasyscript.py')
Example #2
0
    def test_add_and_parse(self):

        options = Options.Options()
        options.add("file",
                    accept=str,
                    value="jasyscript.py",
                    help="Use the given jasy script")
        options.parse(['--file', 'foo'])
        self.assertEqual(options.__getattr__("file"), "foo")
Example #3
0
    def test_getTasks(self):

        options = Options.Options()
        options.parse(['source', '--file', 'foo'])
        self.assertEqual(options.getTasks()[0]['task'], 'source')
Example #4
0
    def test_parse(self):

        options = Options.Options()
        options.parse(['--file', 'bla'])
        self.assertEqual(options.__getattr__("file"), "bla")