mirror of
https://github.com/aclist/dztui.git
synced 2026-08-25 17:32:36 +02:00
chore: change structure of fixtures
This commit is contained in:
parent
8695793af4
commit
a559485d0a
3
tests/fixtures/cpp/test.py
vendored
3
tests/fixtures/cpp/test.py
vendored
@ -1,3 +0,0 @@
|
||||
from dzgui.api.mods import tokenize
|
||||
|
||||
print(tokenize("meta4.cpp"))
|
||||
@ -23,9 +23,6 @@ debug="1"
|
||||
#Toggle stable/testing branch
|
||||
branch="testing"
|
||||
|
||||
#Start in fullscreen
|
||||
fullscreen="false"
|
||||
|
||||
#Steam API key
|
||||
steam_api=""
|
||||
|
||||
45
tests/fixtures/dztuirc_two
vendored
45
tests/fixtures/dztuirc_two
vendored
@ -1,45 +0,0 @@
|
||||
#Path to DayZ installation
|
||||
steam_path="/tmp"
|
||||
|
||||
#Battlemetrics API key
|
||||
api_key=""
|
||||
|
||||
#Favorited server IP:PORT array
|
||||
ip_list=(
|
||||
)
|
||||
|
||||
#Favorite server to fast-connect to (limit one)
|
||||
fav_server=""
|
||||
|
||||
#Favorite server label (human readable)
|
||||
fav_label=""
|
||||
|
||||
#Custom player name (optional, required by some servers)
|
||||
name=""
|
||||
|
||||
#Set to 1 to perform dry-run and print launch options
|
||||
debug=""
|
||||
|
||||
#Toggle stable/testing branch
|
||||
branch="testing"
|
||||
|
||||
#Start in fullscreen
|
||||
fullscreen="false"
|
||||
|
||||
#Steam API key
|
||||
steam_api=""
|
||||
|
||||
#Auto-install mods
|
||||
auto_install="0"
|
||||
|
||||
#Automod staging directory
|
||||
staging_dir="/tmp"
|
||||
|
||||
#Path to default Steam client
|
||||
default_steam_path="/tmp"
|
||||
|
||||
#Preferred Steam launch command (for Flatpak support)
|
||||
preferred_client="steam"
|
||||
|
||||
#DZGUI source path
|
||||
src_path=""
|
||||
@ -1,17 +1,13 @@
|
||||
import pytest
|
||||
from pathlib import Path
|
||||
|
||||
from dzgui.api.mods import tokenize
|
||||
from tests.fixtures import fixture_path
|
||||
|
||||
@pytest.mark.mods
|
||||
@pytest.mark.parametrize("fixture", [
|
||||
fixture_path("cpp/meta1.cpp"),
|
||||
fixture_path("cpp/meta2.cpp"),
|
||||
fixture_path("cpp/meta3.cpp"),
|
||||
fixture_path("cpp/meta4.cpp"),
|
||||
fixture_path("cpp/meta5.cpp"),
|
||||
fixture_path("cpp/meta6.cpp"),
|
||||
]
|
||||
)
|
||||
def test_modmeta(fixture: str) -> None:
|
||||
meta = tokenize(fixture)
|
||||
@pytest.mark.parametrize("i", range(1, 7))
|
||||
def test_modmeta(i: int) -> None:
|
||||
fixture = fixture_path(f"cpp/mod{i}")
|
||||
path = Path(fixture)
|
||||
meta = tokenize(path)
|
||||
assert meta["name"] == "ModName"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user