modernisation for python 3.11

This commit is contained in:
Jörg Thalheim
2023-11-29 12:40:48 +01:00
committed by Mic92
parent 26e3e3872c
commit f1b223d0a1
38 changed files with 160 additions and 163 deletions

View File

@@ -1,6 +1,5 @@
import os
import sys
from typing import Union
import pytest
import pytest_subprocess.fake_process
@@ -28,7 +27,7 @@ def test_ssh_no_pass(
user = "user"
if os.environ.get("IN_NIX_SANDBOX"):
monkeypatch.delenv("IN_NIX_SANDBOX")
cmd: list[Union[str, utils.Any]] = [
cmd: list[str | utils.Any] = [
"nix",
fp.any(),
"shell",
@@ -58,7 +57,7 @@ def test_ssh_with_pass(
user = "user"
if os.environ.get("IN_NIX_SANDBOX"):
monkeypatch.delenv("IN_NIX_SANDBOX")
cmd: list[Union[str, utils.Any]] = [
cmd: list[str | utils.Any] = [
"nix",
fp.any(),
"shell",
@@ -79,7 +78,7 @@ def test_ssh_with_pass(
def test_qrcode_scan(fp: pytest_subprocess.fake_process.FakeProcess) -> None:
cmd: list[Union[str, utils.Any]] = [fp.any()]
cmd: list[str | utils.Any] = [fp.any()]
fp.register(cmd, stdout="https://test.test")
result = cli.qrcode_scan("test.png")
assert result == "https://test.test"