We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
When running Pytest, I get permission errors. A small change to TempCopiedFile cleared it up.
TempCopiedFile
Running pytest with args: ['-p', 'vscode_pytest', '--rootdir=c:\\apps\\cff2toml', 'c:\\apps\\cff2toml\\tests\\models\\files\\test_cff_file.py::test_load_cff_file_loads_metadata_values', ...] ============================= test session starts ============================= platform win32 -- Python 3.12.8, pytest-8.3.4, pluggy-1.5.0 rootdir: c:\apps\cff2toml configfile: pyproject.toml collected 11 items tests\models\files\test_cff_file.py FFFFF [ 45%] tests\models\files\test_pyproject_toml_file.py FF [ 63%] tests\models\files\test_toml_file.py FFFF [100%] ================================== FAILURES =================================== __________________ test_load_cff_file_loads_metadata_values ___________________ dummy_cff_file_path = 'c:\\apps\\cff2toml\\tests\\dummy_files\\dummy_CITATION.cff' def test_load_cff_file_loads_metadata_values(dummy_cff_file_path): > with TempCopiedFile(source_file_path=dummy_cff_file_path) as tmp_dummy_cff_file: tests\models\files\test_cff_file.py:25: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <tests.temp_copied_file.TempCopiedFile object at 0x0000023517C0BCE0> args = (None, None, None) def __exit__(self, *args): > os.remove(path=self.tmp.name) E PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'C:\\Users\\hunte\\AppData\\Local\\Temp\\tmpwwapma3y' tests\temp_copied_file.py:17: PermissionError ... tests\temp_copied_file.py:17: PermissionError =========================== short test summary info =========================== FAILED tests/models/files/test_cff_file.py::test_load_cff_file_loads_metadata_values FAILED tests/models/files/test_cff_file.py::test_load_cff_file_preserves_metadata_order FAILED tests/models/files/test_cff_file.py::test_save_cff_file - PermissionEr... FAILED tests/models/files/test_cff_file.py::test_get_version_for_cff_with_default_file_path FAILED tests/models/files/test_cff_file.py::test_get_title_for_cff_with_default_file_path FAILED tests/models/files/test_pyproject_toml_file.py::test_get_project_version_metadata_for_pyproject_toml_with_default_file_path FAILED tests/models/files/test_pyproject_toml_file.py::test_get_project_name_metadata_for_pyproject_toml_with_default_file_path FAILED tests/models/files/test_toml_file.py::test_load_toml_file_loads_metadata_values FAILED tests/models/files/test_toml_file.py::test_load_toml_file_preserves_metadata_order FAILED tests/models/files/test_toml_file.py::test_save_toml_file - Permission... FAILED tests/models/files/test_toml_file.py::test_save_toml_file_preserves_metadata_order_after_set_existing_metadata ============================= 11 failed in 0.34s ============================== Finished running tests!
The text was updated successfully, but these errors were encountered:
No branches or pull requests
When running Pytest, I get permission errors. A small change to
TempCopiedFile
cleared it up.The text was updated successfully, but these errors were encountered: