pytest-datadir
pytest-datadir copied to clipboard
Add fixes for _win32_longpath
This should fix #33.
I am not sure how I should test for this, as it depends on being on Windows and having UNC paths around.
I first push a test that should fail on Appveyor before adding a fix.
I am not sure how I should test for this, as it depends on being on Windows and having UNC paths around.
A unittest like the one you did looks sufficient. 👍
Ha, inspiration strikes, I just realised that the path does not have to exist to check it.
Do you know what's up with this test failure, that does not seem to be related to me?
OK, I am done, and it seems to work.
That CI failure from py35 onwards seems to be caused by a file in the test harness having an overly long name, which Windows/Python does not deal gracefully with. The fact that isfile() fails seems to support this. Dunno why this was not a problem before, or why not at lower Python versions?
Could the test collection failure be a pytest problem? I see it working with pytest-4.6.11, and failing with pytest-6.1.1 where it was previously working with pytest-5.2.1.
Btw, I just realised you also have Travis tests, but they are not displayed in this PR checks field. I think there was a necessary change in the Travis-Github authentication that you had to do so that does not break. I think the Travis account owner needs to do this.
Hi @bilderbuchi - thanks for submitting this PR. We very much appreciate. I will take a look at this later this week and let you know about it. Stay tuned ;-)
I looked here and the change and the tests look good. Thanks @bilderbuchi
I don't work on Windows, so it took me some effort to test this on Windows. The first thing is actually cloning the git repo on Windows failed because of the Windows path length limit/constraint. @nicoddemus I don't think we should have the test file committed there. Probably it would be worth generating it dynamically on the test. This may help to explain the problems on AppVeyor too.
OK, thanks! Do you need anything from me here to proceed?
Btw, you'll probably have to test that "dynamically creating" the files actually works correctly (e.g. in a separate PR), I expect you will run into problems because Windows will also refuse to create those files. :-P