Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

process windows paths for pathlib fixes #111 #112

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

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