
import unittest

from tailorscad.arg_parser import parse_args


class TestArgParser(unittest.TestCase):

    def test_parse_args_none(self):

        args = []
        argv = []

        args = parse_args(argv)

        self.assertFalse(args)

    def test_parse_args_inknown(self):

        args = []
        argv = ['-a', 'word']

        args = parse_args(argv)

        self.assertFalse(args)

    def test_parse_args_known(self):

        args = []
        argv = ['-c', 'test']

        args = parse_args(argv)

        self.assertTrue(args)
        self.assertEqual(args, ['test'])

    def test_parse_args_unkown_and_known(self):
        args = []
        argv = ['-a', 'word', '-c', 'test']

        args = parse_args(argv)

        self.assertTrue(args)
        self.assertEqual(args, ['test'])

@@ -227,34 +227,41 @@
 assertFalse(args
+.config
 )%0A
-
 %0A    def test_pa
@@ -396,16 +396,23 @@
 lse(args
+.config
 )%0A%0A    d
@@ -585,26 +585,31 @@
 ual(args
+.config
 , 
-%5B
 'test'
-%5D
 )%0A%0A    d
@@ -810,16 +810,21 @@
 args
+.config
 , 
-%5B
 'test'
-%5D
 )%0A

Fix unit tests for arg_parser