示例#1
0
def test_empty_input() -> None:
    # running schema_salad tool wihtout any args
    args = []  # type: List[str]
    with captured_output() as (out, err):
        cli_parser.main(args)

    response = out.getvalue().strip()
    assert "error: too few arguments" in response
示例#2
0
def test_version() -> None:
    args = [["--version"], ["-v"]]  # type: List[List[str]]
    for arg in args:
        with captured_output() as (out, err):
            cli_parser.main(arg)

        response = out.getvalue().strip()  # capture output and strip newline
        assert "Current version" in response
示例#3
0
    def test_empty_input(self):
        # running schema_salad tool wihtout any args
        args = []
        with captured_output() as (out, err):
            cli_parser.main(args)

        response = out.getvalue().strip()
        self.assertTrue("error: too few arguments" in response)
    def test_empty_input(self):
        # running schema_salad tool wihtout any args
        args = []
        with captured_output() as (out, err):
            cli_parser.main(args)

        response = out.getvalue().strip()
        self.assertTrue("error: too few arguments" in response)
    def test_version(self):
        args = [["--version"], ["-v"]]
        for arg in args:
            with captured_output() as (out, err):
                cli_parser.main(arg)

            response = out.getvalue().strip()  # capture output and strip newline
            self.assertTrue("Current version" in response)
示例#6
0
    def test_version(self):
        args = [["--version"], ["-v"]]
        for arg in args:
            with captured_output() as (out, err):
                cli_parser.main(arg)

            response = out.getvalue().strip(
            )  # capture output and strip newline
            self.assertTrue("Current version" in response)