(style, encoding)
| 1674 | @pytest.mark.parametrize("style", ["short", "long"]) |
| 1675 | @pytest.mark.parametrize("encoding", [None, "utf8", "utf16"]) |
| 1676 | def test_repr_traceback_with_unicode(style, encoding): |
| 1677 | if encoding is None: |
| 1678 | msg: str | bytes = "☹" |
| 1679 | else: |
| 1680 | msg = "☹".encode(encoding) |
| 1681 | try: |
| 1682 | raise RuntimeError(msg) |
| 1683 | except RuntimeError: |
| 1684 | e_info = ExceptionInfo.from_current() |
| 1685 | formatter = ExceptionInfoFormatter(style=style) |
| 1686 | repr_traceback = formatter.repr_traceback(e_info) |
| 1687 | assert repr_traceback is not None |
| 1688 | |
| 1689 | |
| 1690 | def test_cwd_deleted(pytester: Pytester) -> None: |
nothing calls this directly
no test coverage detected