mirror of
https://github.com/freedomofpress/dangerzone.git
synced 2025-04-28 18:02:38 +02:00
23 lines
634 B
Python
23 lines
634 B
Python
import platform
|
|
import subprocess
|
|
from pathlib import Path
|
|
|
|
import pytest
|
|
|
|
import dangerzone.util as util
|
|
|
|
VERSION_FILE_NAME = "version.txt"
|
|
|
|
|
|
def test_get_resource_path():
|
|
share_dir = Path("share").resolve()
|
|
resource_path = Path(util.get_resource_path(VERSION_FILE_NAME)).parent
|
|
assert share_dir.samefile(
|
|
resource_path
|
|
), f"{share_dir} is not the same file as {resource_path}"
|
|
|
|
|
|
@pytest.mark.skipif(platform.system() != "Windows", reason="Windows-specific")
|
|
def test_get_subprocess_startupinfo():
|
|
startupinfo = util.get_subprocess_startupinfo()
|
|
assert isinstance(startupinfo, subprocess.STARTUPINFO)
|