fix fileinput.input encoding only since Python 3.10

This commit is contained in:
scito 2023-01-01 00:41:11 +01:00
parent 003e122808
commit 869c404489
2 changed files with 7 additions and 2 deletions

View file

@ -38,7 +38,7 @@ qreader_available: bool = extract_otp_secrets.qreader_available
# Quickfix comment
# @pytest.mark.skipif(sys.platform.startswith("win") or not qreader_available or sys.implementation.name == 'pypy', reason="Quickfix")
# @pytest.mark.skipif(sys.platform.startswith("win") or not qreader_available or sys.implementation.name == 'pypy' or sys.version_info >= (3, 10), reason="Quickfix")
def test_extract_stdout(capsys: pytest.CaptureFixture[str]) -> None:
@ -356,6 +356,7 @@ def test_normalize_bytes() -> None:
# Generate verbose output: python3.11 src/extract_otp_secrets.py example_export.txt -v -n > tests/data/print_verbose_output.txt
@pytest.mark.skipif(sys.version_info < (3, 10), reason="fileinput.input encoding exists since PYTHON 3.10")
def test_extract_verbose(capsys: pytest.CaptureFixture[str], relaxed: bool) -> None:
# Act
extract_otp_secrets.main(['-n', '-v', 'example_export.txt'])