예제 #1
0
    def parse(self, args, namespace=None):
        from _pytest._argcomplete import try_argcomplete

        self.optparser = self._getparser()
        try_argcomplete(self.optparser)
        args = [str(x) if isinstance(x, py.path.local) else x for x in args]
        return self.optparser.parse_args(args, namespace=namespace)
예제 #2
0
    def parse(self, args, namespace=None):
        from _pytest._argcomplete import try_argcomplete

        self.optparser = self._getparser()
        try_argcomplete(self.optparser)
        return self.optparser.parse_args([str(x) for x in args],
                                         namespace=namespace)
예제 #3
0
    def parse(self, args, namespace=None):
        from _pytest._argcomplete import try_argcomplete

        self.optparser = self._getparser()
        try_argcomplete(self.optparser)
        args = [str(x) if isinstance(x, py.path.local) else x for x in args]
        return self.optparser.parse_args(args, namespace=namespace)
예제 #4
0
    def parse(
        self,
        args: Sequence[Union[str, py.path.local]],
        namespace: Optional[argparse.Namespace] = None,
    ) -> argparse.Namespace:
        from _pytest._argcomplete import try_argcomplete

        self.optparser = self._getparser()
        try_argcomplete(self.optparser)
        strargs = [str(x) if isinstance(x, py.path.local) else x for x in args]
        return self.optparser.parse_args(strargs, namespace=namespace)
예제 #5
0
    def parse(
        self,
        args: Sequence[Union[str, "os.PathLike[str]"]],
        namespace: Optional[argparse.Namespace] = None,
    ) -> argparse.Namespace:
        from _pytest._argcomplete import try_argcomplete

        self.optparser = self._getparser()
        try_argcomplete(self.optparser)
        strargs = [os.fspath(x) for x in args]
        return self.optparser.parse_args(strargs, namespace=namespace)
예제 #6
0
    def parse(self, args, namespace=None):
        from _pytest._argcomplete import try_argcomplete

        self.optparser = self._getparser()
        try_argcomplete(self.optparser)
        return self.optparser.parse_args([str(x) for x in args], namespace=namespace)