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

Determine options for disable warning for generated filenames that already exist in test suite #173

Open
clach04 opened this issue Nov 17, 2024 · 0 comments

Comments

@clach04
Copy link
Owner

clach04 commented Nov 17, 2024

Impacts same test for multiple file types:

python -m puren_tonbo.tests.testsuite   TestFileSystemNotesWriteFunctionSaveEncryptedCompressedZlib.test_filename_gen_one_with_password_already_exist

Results in successful test and warnings to stderr:

mylogger __init__.py:1401 note_contents_save_native_filename() - WARNING - generated filename 'C:\\Users\\clach04\\AppData\\Local\\Temp\\TestFileSystemNotesWrite_tmpe0c6ndx_\\one.gz' already exists, generating alternative

TestFileSystemNotesWriteFunctionSaveRawPlainText.test_filename_gen_one_with_password_already_exist() deliberately tests to make sure that derived duplicate filenames do NOT result in data loss, instead a similar named file will be created. The current code always warns when this happens.

Consider adding a new option (dictionary, class) parameter into note_contents_save_filename() / note_contents_save_native_filename() to allow more options without an API change to allow this to be disabled (temporarily) when this one test is ran.

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

No branches or pull requests

1 participant