build: cleanup for new selenium and guards
Some checks failed
tests / test (3.10) (push) Has been cancelled
tests / test (3.11) (push) Has been cancelled
tests / test (3.12) (push) Has been cancelled
tests / test (3.13) (push) Has been cancelled
tests / test (3.8) (push) Has been cancelled
tests / test (3.9) (push) Has been cancelled

This commit is contained in:
Mathew Sir Guest the best 2026-05-31 01:56:37 -06:00
parent bb7325008b
commit 0c8fa30145
2 changed files with 15 additions and 4 deletions

@ -1,5 +1,6 @@
import selenium import selenium
import selenium.webdriver import selenium.webdriver
from selenium.webdriver.common.by import By
URL_MUTATORS = "https://ut4pugs.us/redirect-mutators" URL_MUTATORS = "https://ut4pugs.us/redirect-mutators"
URL_MAPS = "https://ut4pugs.us/redirect-mutators" URL_MAPS = "https://ut4pugs.us/redirect-mutators"
@ -25,12 +26,12 @@ class ScrapeUt4Pugs:
self._check_pak_md5sums() self._check_pak_md5sums()
def _check_pak_md5sums(self): def _check_pak_md5sums(self):
tbl_of_mutators = self.browser.find_element_by_id("myTable") tbl_of_mutators = self.browser.find_element(By.ID, "myTable")
print(tbl_of_mutators) print(tbl_of_mutators)
mut_rows = tbl_of_mutators.find_elements_by_xpath("tbody/tr") mut_rows = tbl_of_mutators.find_elements(By.XPATH, "tbody/tr")
for r in mut_rows: for r in mut_rows:
mut_cols = r.find_elements_by_xpath("td") mut_cols = r.find_elements(By.XPATH, "td")
if len(mut_cols) != 3: if len(mut_cols) != 3:
input("<breakpoint> at unexpected columns for mutator. received {}".format(len(mut_cols))) input("<breakpoint> at unexpected columns for mutator. received {}".format(len(mut_cols)))
mut_file = mut_cols[0] mut_file = mut_cols[0]

@ -1,7 +1,16 @@
import os
from smileyface.settings import AppSettings from smileyface.settings import AppSettings
def test_defaults(): def _clear_smileyface_env(monkeypatch):
for key in list(os.environ):
if key.startswith("SMILEYFACE_"):
monkeypatch.delenv(key, raising=False)
def test_defaults(monkeypatch):
_clear_smileyface_env(monkeypatch)
settings = AppSettings(_env_file=None) settings = AppSettings(_env_file=None)
assert settings.sqlite_filename == "smiles.db" assert settings.sqlite_filename == "smiles.db"
assert settings.skip_validate is False assert settings.skip_validate is False
@ -9,6 +18,7 @@ def test_defaults():
def test_env_overrides(monkeypatch): def test_env_overrides(monkeypatch):
_clear_smileyface_env(monkeypatch)
monkeypatch.setenv("SMILEYFACE_PROJECT_DIR", "/srv/ut4") monkeypatch.setenv("SMILEYFACE_PROJECT_DIR", "/srv/ut4")
monkeypatch.setenv("SMILEYFACE_SKIP_VALIDATE", "true") monkeypatch.setenv("SMILEYFACE_SKIP_VALIDATE", "true")
settings = AppSettings(_env_file=None) settings = AppSettings(_env_file=None)