Skip to content

Conversation

@zapplecat
Copy link

@zapplecat zapplecat commented Aug 22, 2021

Fixes #111, mock is used for the py2 instances of tests (which don't seem to be part of the CI...?).

Changes proposed in this pull request:

  • Convert all paths from windows operations to strings
  • Detect unsupported python versions for pathlib paths and throw RuntimeError

Output from Pytest:

============================= test session starts =============================
platform win32 -- Python 3.9.6, pytest-6.1.2, py-1.10.0, pluggy-0.13.1
rootdir: E:\Projects\oschmod, configfile: setup.cfg
collected 21 items

tests\test_oschmod.py ........                                           [ 38%]
tests\test_oschmod_pathlib.py .............                              [100%]

============================== warnings summary ===============================
..\oschmod_venv\lib\site-packages\_pytest\config\__init__.py:1230
  e:\projects\oschmod_venv\lib\site-packages\_pytest\config\__init__.py:1230: PytestConfigWarning: Unknown config option: mock_use_standalone_module

    self._warn_or_fail_if_strict("Unknown config option: {}\n".format(key))

-- Docs: https://docs.pytest.org/en/stable/warnings.html
======================== 21 passed, 1 warning in 4.21s ========================

@zapplecat
Copy link
Author

@YakDriver no rush, but how does this PR look?

@grottohub
Copy link

bumping this :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

oschmod does not work with pathlib.Path in Windows

2 participants