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

test_mismatched_extensions test fails on case-insensitive filesystems #48

Open
amarshall opened this issue Mar 27, 2024 · 3 comments
Open

Comments

@amarshall
Copy link

amarshall commented Mar 27, 2024

I tried have a look through the logic, but the overall intent is a bit over my head as I’m not familiar with the code and only use this package indirectly. Fails on e.g. macOS. Test log:

======================================================================
FAIL: test_mismatched_extensions (__main__.TestDbfFunctions.test_mismatched_extensions)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/private/tmp/nix-build-python3.11-dbf-0.99.9.drv-0/dbf-0.99.9/dbf/test.py", line 4822, in test_mismatched_extensions
    self.assertEqual(table._meta.memoname, new_memo_name)
AssertionError: '/private/tmp/nix-build-python3.11-dbf-0.99.9.drv-0/tmpedpvv9u9/temptable.dbt' != '/private/tmp/nix-build-python3.11-dbf-0.99.9.drv-0/tmpedpvv9u9/temptable.Dbt'
- /private/tmp/nix-build-python3.11-dbf-0.99.9.drv-0/tmpedpvv9u9/temptable.dbt
?                                                                          ^
+ /private/tmp/nix-build-python3.11-dbf-0.99.9.drv-0/tmpedpvv9u9/temptable.Dbt
?                                                                          ^
@thornycrackers
Copy link

I think the problem here is around this line. There's some logic to look for files with different case sensitivities but this line will always be True for the test case on darwin. You can test this out by stopping right after the call to os.rename and checking the values.

aaa

I don't know what the right answer is, but wanted to add some more information to help come up with a solution.

@amarshall
Copy link
Author

From what I remember back when I dug into this a bit, I wasn’t really sure if the implementation was actually correct, or if it was really even needed. But I don’t really have the context for why it’s trying to do all this filename case handling.

@ethanfurman
Copy link
Owner

Thank you for the further info.

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

3 participants