def parse(self, args): |
""" parse cmdline arguments into this config object. |
Note that this can only be called once per testing process. |
""" |
assert not self._initialized, ( |
"can only parse cmdline args once per Config object") |
self._initialized = True |
adddefaultoptions(self) |
self._conftest.setinitial(args) |
args = [str(x) for x in args] |
cmdlineoption, args = self._parser.parse_args(args) |
self.option.__dict__.update(vars(cmdlineoption)) |
if not args: |
args.append(py.std.os.getcwd()) |
-> self.topdir = gettopdir(args) |
self.args = args |