mirror of
https://github.com/aclist/dztui.git
synced 2026-10-25 12:12:31 +01:00
change: update time range assertions
This commit is contained in:
1 parent
32b8c5cbc5
commit
e254821105
3 files changed
+7
-5
No files matched your search
@@ -32,10 +32,10 @@ class FilterManager:
|
||||
# TODO: strings
|
||||
self.tooltips = {
|
||||
strings.filter_1pp: "First-person perspective",
|
||||
strings.filter_day: "In-game time between 0700 and 1659",
|
||||
strings.filter_day: "In-game time between 0600 and 1759",
|
||||
strings.filter_empty: "Servers with no players",
|
||||
strings.filter_3pp: "Third-person perspective",
|
||||
strings.filter_night: "In-game time between 1700 and 0659",
|
||||
strings.filter_night: "In-game time between 1800 and 0559",
|
||||
strings.filter_full: "Servers with no open slots",
|
||||
strings.filter_official: "Bohemia official servers",
|
||||
strings.filter_nonascii: "Server names using non-standard, complex glyphs",
|
||||
|
||||
@@ -12,8 +12,8 @@ if TYPE_CHECKING:
|
||||
from dzgui.api.servers import Record
|
||||
from dzgui.model.servers import NewPlayerCount
|
||||
|
||||
DAY_REG = r"([0][7-9]|[1][0-6])"
|
||||
NIGHT_REG = r"([0][0-6]|[1][7-9]|[2][0-3])"
|
||||
DAY_REG = r"([0][6-9]|[1][0-7])"
|
||||
NIGHT_REG = r"([0][0-5]|[1][8-9]|[2][0-3])"
|
||||
|
||||
|
||||
class ProxyModelManager:
|
||||
|
||||
+3
-1
@@ -1,7 +1,9 @@
|
||||
import re
|
||||
|
||||
from dzgui.model.proxy_model import DAY_REG, NIGHT_REG
|
||||
import pytest
|
||||
|
||||
pytestmark = pytest.mark.FOO
|
||||
|
||||
def iterate(h: str, r: str) -> None:
|
||||
for m in range(60):
|
||||
@@ -18,6 +20,6 @@ def test_day() -> None:
|
||||
|
||||
def test_night() -> None:
|
||||
for h in range(24):
|
||||
if 6 < h < 17:
|
||||
if 5 < h < 18:
|
||||
continue
|
||||
iterate(h, NIGHT_REG)
|
||||
Reference in new issue
Block a user