safer icon indicating copy to clipboard operation
safer copied to clipboard

Fix Failing Tests on Windows (WIP)

Open Chiemezuo opened this issue 4 months ago • 2 comments

This is in line with #8

I'm working on getting the test cases to pass for Windows.

Upon installation, 6 of the 70 existing tests were failing. Here's a short summary of them:

=================================================== short test summary info =================================================== 
FAILED test/test_open.py::TestSafer::test_file_perms - AssertionError: -rw-rw-rw-
FAILED test/test_open.py::TestSafer::test_symlink_directory - OSError: [WinError 1314] A required privilege is not held by the client: 'sub' -> 'sub.sym'
FAILED test/test_open.py::TestSafer::test_symlink_file - OSError: [WinError 1314] A required privilege is not held by the client: 'one' -> 'one.sym'
FAILED test/test_open.py::TestSafer::test_tempfile_perms - assert 33206 in (33188, 33204)
FAILED test/test_writer.py::test_wrapper_bug2 - PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'C:\\Users\\...
FAILED test/test_writer.py::test_wrapper_bug3 - PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'C:\\Users\\...

Fixed tests

  • [x] test_file_perms
  • [ ] test_symlink_directory
  • [ ] test_symlink_file
  • [ ] test_temlpfile_perms
  • [ ] test_wrapper_bug2
  • [ ] test_wrapper_bug3

Summary by Sourcery

Bug Fixes:

  • Fix the test_file_perms test to handle file permission checks correctly on Windows by adjusting the logic to account for Windows-specific file handling.

Chiemezuo avatar Oct 22 '24 13:10 Chiemezuo