Lines Matching refs:ns
310 ns = argparse.Namespace(testdir=None, verbose=0, quiet=False,
317 if not hasattr(ns, k):
320 setattr(ns, k, v)
321 if ns.use_resources is None:
322 ns.use_resources = []
327 ns.args = parser.parse_known_args(args=args, namespace=ns)[1]
328 for arg in ns.args:
333 if ns.single and ns.fromfile:
335 if ns.use_mp is not None and ns.trace:
337 if ns.use_mp is not None and ns.findleaks:
339 if ns.failfast and not (ns.verbose or ns.verbose3):
341 if ns.pgo and (ns.verbose or ns.verbose2 or ns.verbose3):
344 if ns.nowindows:
348 if ns.quiet:
349 ns.verbose = 0
350 if ns.timeout is not None:
351 if ns.timeout <= 0:
352 ns.timeout = None
353 if ns.use_mp is not None:
354 if ns.use_mp <= 0:
356 ns.use_mp = 2 + (os.cpu_count() or 1)
357 if ns.use:
358 for a in ns.use:
361 ns.use_resources[:] = ALL_RESOURCES
364 del ns.use_resources[:]
371 if r in ns.use_resources:
372 ns.use_resources.remove(r)
373 elif r not in ns.use_resources:
374 ns.use_resources.append(r)
375 if ns.random_seed is not None:
376 ns.randomize = True
377 if ns.verbose:
378 ns.header = True
379 if ns.huntrleaks and ns.verbose3:
380 ns.verbose3 = False
384 if ns.match_filename:
385 if ns.match_tests is None:
386 ns.match_tests = []
387 with open(ns.match_filename) as fp:
389 ns.match_tests.append(line.strip())
391 return ns