theY4Kman / pycharm-pytest-imp

PyCharm pytest improvements plugin
https://plugins.jetbrains.com/plugin/14202-pytest-imp/
17 stars 2 forks source link

Relative path not working #10

Closed kbakk closed 2 years ago

kbakk commented 2 years ago

Hi, Thanks for this plugin, it's helpful. 🙌

This is a minor issue but I figured I'd report it as it seems to prevent the default behavior from working.

In Preferences | Tools | Python Integrated Tools | py.test

If I set path to pyproject.toml it won't discover the config.

If I set <absolute path>/pyproject.toml - e.g. /Users/krisb/Code/nep/file-processing-trigger/pyproject.toml, it discovers the config.

Same with pytest.ini, only absolute path works.

Platform: MacOS, PyCharm 2021.2.1 (Professional Edition).

theY4Kman commented 2 years ago

Heh, yeah, I wanted relative paths to be valid from the start. The intellij SDK is expansive ("big, really big. you just won't believe how vastly, mind-bogglingly big it really is"), and I was never quite sure if I just couldn't find the correct right way to do it, or if I really had to do things naïvely (i.e. enumerate all content roots and use the first matching file); but I was definitely sure I was spending more time trying to figure it out than actually building out the core functionality of the plugin :P

However, I can't tell you how much I appreciate you reporting this, because now that I've come back to it with fresh eyes, I realize I don't care if there's a proper way... the naïve way absolutely works, and I'll throw up a release for it in the coming minutes <3

theY4Kman commented 2 years ago

Aight, the fix will be available in version 0.5.3 — which can be installed manually using the .zip from its GitHub release, or from the Jetbrains plugin repo in a day or two (after they approve the update).