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
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
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)
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)