retostauffer / python-colorspace

Python colorspace implementation. Documentation available on https://retostauffer.github.io/python-colorspace/. The latest release is available via the Python Package Index (PyPI) via https://pypi.org/project/colorspace/
Other
69 stars 15 forks source link

Custom palette tests fail on Windows #21

Closed hollowscene closed 4 weeks ago

hollowscene commented 2 months ago

Five tests fail in test_palettes_custom_palconfig_files.py when test suite is run on Windows.

Here is the full pytest output: pytest_results.txt

For quick access, the error message of one of those test fails:

___________________________________ test_hclpalettes_custom_palconfig_good_custom_div ___________________________________ 

    def test_hclpalettes_custom_palconfig_good_custom_div():

        tmpfile = NamedTemporaryFile()
>       with open(tmpfile.name, "w") as fid: fid.write(good_custom_div)
E       PermissionError: [Errno 13] Permission denied: 'C:\\Users\\andrew\\AppData\\Local\\Temp\\tmpmchuptx8'

This appears to be an OS difference caused by the tempfile package. Old but relevant StackOverflow answer.

retostauffer commented 1 month ago

Dear @hollowscene

thank you for pointing this out and providing a pull request to resolve this issue. We have merged your PR (https://github.com/retostauffer/python-colorspace/pull/22) and successfully ran all tests on both, Windows and Linux.

Some more details can be found here: https://github.com/retostauffer/python-colorspace/pull/22#issuecomment-2396264315

retostauffer commented 4 weeks ago

Many thanks again @hollowscene for reviewing our submission to The Open Source Journal.

Your bug report and PR (#22) were greatly appreciated! I’ll be closing the issue at this time.