SublimeText / UnitTesting

Testing Sublime Text Packages
MIT License
111 stars 32 forks source link

Question: My plugin didn't generate files as it should #211

Closed lucifiel1618 closed 7 months ago

lucifiel1618 commented 1 year ago

This is the package that I wrote: https://github.com/lucifiel1618/SublimeScarpetSyntax

It worked fine and passed all tests in local UnitTesting runs. Things didn't go as well with github CI.

You can see it here that it is supposed to create an user package folder Packages/User/Scarpet upon plugin_loaded(): https://github.com/lucifiel1618/SublimeScarpetSyntax/blob/main/scarpet.py#L164-L172

But it didn't as you can see in this CI job log: FileNotFoundError: [Errno 2] No such file or directory: '/home/runner/.config/sublime-text/Packages/User/Scarpet'

This has never happened in my local tests. I spent a lot of time investigating it but no luck so far... I run out of ideas for testing, so I would really appreciate any advices...

randy3k commented 1 year ago

Maybe trying the capture_console setting to see if there is any error message?

deathaxe commented 7 months ago

The plugin run targets python 3.3 and depends on pathlib, which is not part of py33's stdlib.

Thus the plugin fails loading upstream and works by luck downstream - maybe due to an other plugin being installed correctly referencing to pathlib dependency.

Easiest solution was to opt-in your package to python 3.8 via .python-version file.