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

fix: [Bug]: Path tests failing on Windows #616 #625

Merged
merged 2 commits into from
Dec 3, 2024

Conversation

VasigaranAndAngel
Copy link
Collaborator

  1. in tagstudio/tests/test_driver.py::test_evaluate_path_last_lib_present test, updated the test to explicitly define a QSettings file and format to address a bug causing test failures. previously, QSettings() was constructed without specifying an organization or application name. which per the documentation, prevents reading or writing settings. the new implementation creates a temporary settings file and uses it to save the settings. this ensures the test can properly save and read the settings.
  2. tagstudio/tests/test_library.py::test_save_windows_path removed, which isnt' testing anything meaningfully.

resolves #616

@CyanVoxel CyanVoxel added Type: Bug Something isn't working as intended Type: Tests Tests or testing related Status: Review Needed A review of this is needed labels Dec 3, 2024
@CyanVoxel CyanVoxel self-assigned this Dec 3, 2024
@CyanVoxel
Copy link
Member

LGTM, and this passes on both Windows and macOS.

And just so this is public, test_save_windows_path was discussed to not be a valuable test as .path would return either a POSIX or Windows path depending on the system it was ran on, when the test was built upon the expectation that it would always return a POSIX path from the library.

@CyanVoxel CyanVoxel merged commit a630b09 into TagStudioDev:main Dec 3, 2024
5 checks passed
yedpodtrzitko pushed a commit to yedpodtrzitko/TagStudio that referenced this pull request Dec 4, 2024
DandyDev01 pushed a commit to DandyDev01/TagStudio that referenced this pull request Dec 13, 2024
* fix: tagstudio/tests/test_driver.py::test_evaluate_path_last_lib_present always fails in windows.

* refactor: removal tagstudio/tests/test_library.py::test_save_windows_path

Fixes TagStudioDev#616
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Review Needed A review of this is needed Type: Bug Something isn't working as intended Type: Tests Tests or testing related
Projects
Status: ✅ Done
Development

Successfully merging this pull request may close these issues.

[Bug]: Path tests failing on Windows
2 participants