Xqt added a comment.

  You are right for the most tests but generate_user_files, probably 
generate_family.file, user-config aren't independent from base directory. For 
this reason you have to adjust it if you run tests for those. I am sure 
i18n_tests will also fail (maybe it should not!). So changing the given test 
here to just using an absolute file path is trivial and can never fail; the 
test is superfluous then, Might be one can adjust the base dir by a pytest 
environment value because running pytests adjusts the root itself for framework 
location:
  
    D:\>pytest pwb/git/core/tests/generate_user_files_tests.py
    ============================= test session starts 
=============================
    platform win32 -- Python 3.11.0, pytest-7.3.1, pluggy-1.0.0
    rootdir: D:\pwb\git\core
    configfile: tox.ini
    plugins: attrib-0.1.3, cov-4.0.0, subtests-0.10.0
    collected 0 items / 1 error
    
    =================================== ERRORS 
====================================
    _____________ ERROR collecting tests/generate_user_files_tests.py 
_____________
    ...

TASK DETAIL
  https://phabricator.wikimedia.org/T340447

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: RoySmith, Xqt
Cc: Xqt, Aklapper, pywikibot-bugs-list, RoySmith, PotsdamLamb, Jyoo1011, 
JohnsonLee01, SHEKH, Dijkstra, Khutuck, Zkhalido, Viztor, Wenyi, Tbscho, MayS, 
Mdupont, JJMC89, Dvorapa, Altostratus, binbot, Avicennasis, mys_721tx, jayvdb, 
Masti, Alchimista
_______________________________________________
pywikibot-bugs mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to