wire --prog through
diff --git a/examples/c/.gitignore b/examples/c/.gitignore
new file mode 100644
index 0000000..ce01362
--- /dev/null
+++ b/examples/c/.gitignore
@@ -0,0 +1 @@
+hello
diff --git a/typ/arg_parser.py b/typ/arg_parser.py
index cb51711..b8749db 100644
--- a/typ/arg_parser.py
+++ b/typ/arg_parser.py
@@ -158,6 +158,8 @@
self.add_argument('--no-overwrite', action='store_false',
dest='overwrite', default=None,
help=argparse.SUPPRESS)
+ self.add_argument('--prog', action='append',
+ help='program args to override in test case')
if discovery or running:
self.add_argument('-P', '--path', action='append', default=[],
diff --git a/typ/runner.py b/typ/runner.py
index 75331fa..68fd288 100644
--- a/typ/runner.py
+++ b/typ/runner.py
@@ -724,6 +724,7 @@
self.top_level_dir = parent.top_level_dir
self.loaded_suites = {}
self.cov = None
+ self.prog = parent.args.prog
def _setup_process(host, worker_num, child):
@@ -813,6 +814,8 @@
if isinstance(test_case, TypTestCase):
test_case.child = child
test_case.context = child.context_after_setup
+ if child.prog:
+ test_case.prog = child.prog
test_result = unittest.TestResult()
out = ''