kaste / PyTest

pytest runner and view annotator for sublime text
21 stars 6 forks source link

fix inline annotation problems #2

Closed zhanglix closed 7 years ago

zhanglix commented 7 years ago
    • fix inline annotation problems
    • add env settings
    • support matching 'async def test_xxx' tests
kaste commented 7 years ago

Can you describe what the env setting is for? Do you want specific settings in env just for this plugin, or does the plugin run pytest with the wrong/no env set? Does this even work? I ask because I read a comment in the sublime code that I would have to open a login shell (on darwin only) for the env to actually work, but I dunno...

shell defaults to False so I probably just would delete that line here. Good catch for async def. Didn't know pytest has a plugin for that. 🍬

zhanglix commented 7 years ago

the env setting is just used to set additional env when running pyteset My favorite one is "env": {"PYTHONASYNCIODEBUG" : "true"} which make detecting bugs of async code much easier.

I think there are something different on darwin that '/bin/env xxx=xx pytest test_case.py' dose not work the same way as 'export xxx=xx; pytest testc_ase.py'

kaste commented 7 years ago

We will see if the env setting works for most users. Thank you for your contribution!