diff --git a/tests/test_tracebacks.py b/tests/test_tracebacks.py index 69de280d11..2f692aefaa 100644 --- a/tests/test_tracebacks.py +++ b/tests/test_tracebacks.py @@ -14,7 +14,12 @@ def test_traceback_rich(): assert "typer.run(main)" in result.stderr assert "print(name + 3)" in result.stderr - assert 'TypeError: can only concatenate str (not "int") to str' in result.stderr + + # TODO: when deprecating Python 3.6, remove second option + assert ( + 'TypeError: can only concatenate str (not "int") to str' in result.stderr + or "TypeError: must be str, not int" in result.stderr + ) assert "name = 'morty'" in result.stderr @@ -30,7 +35,11 @@ def test_traceback_no_rich(): assert "typer.run(main)" in result.stderr assert "print(name + 3)" in result.stderr - assert 'TypeError: can only concatenate str (not "int") to str' in result.stderr + # TODO: when deprecating Python 3.6, remove second option + assert ( + 'TypeError: can only concatenate str (not "int") to str' in result.stderr + or "TypeError: must be str, not int" in result.stderr + ) def test_unmodified_traceback(): @@ -48,4 +57,8 @@ def test_unmodified_traceback(): ) assert "typer.main.get_command(broken_app)()" in result.stderr assert "print(name + 3)" in result.stderr - assert 'TypeError: can only concatenate str (not "int") to str' in result.stderr + # TODO: when deprecating Python 3.6, remove second option + assert ( + 'TypeError: can only concatenate str (not "int") to str' in result.stderr + or "TypeError: must be str, not int" in result.stderr + )