Smokey tests fail to run on WindowsSee original GitHub issue
Smokey Detector includes a Windows incompatible library:
sh. This is clearly noticed when running tests locally.
ImportError while importing test module 'H:\Development\SmokeDetector\test\test_chatcommunicate.py'. Hint: make sure your test modules/packages have valid Python names. Traceback: test\test_chatcommunicate.py:3: in <module> from chatcommunicate import * chatcommunicate.py:10: in <module> import chatcommands chatcommands.py:13: in <module> from gitmanager import GitManager gitmanager.py:1: in <module> from sh import git h:\Anaconda\lib\site-packages\sh.py:36: in <module> support." % __version__) E ImportError: sh 1.12.9 is currently only supported on linux and osx. please install pbs 0.110 (http://pypi.python.org/pypi/pbs) for windows support.
Is there an alternative we can utilize that will allow developers in both environments to work without the above error?
- Created 7 years ago
- Comments:11 (11 by maintainers)
Top GitHub Comments
So, I’ve looked into this a little. It’ll be a hackish mess where we have to replace the
sh library with, essentially, a single
git command and have to specify the commands we want to execute as a string passed to a subprocess call. This is… not very pretty actually, and very hard to actually get working the same way that
git functionality operates.
Even with such hackish approach, it’s got some headaches and evils with it, such as we then have to strip shell colors, etc. and we have to reapproach how we handle exit codes and git calls in many places. For now, I’m going to mark this as ‘status: declined’, but we can revisit this in the future when we’re all a bit less busy. Between me, ArtOfCode, and Undo, we are all trying to figure when Smokey would be run in Production environments, and we can’t think of any - we all currently run in Linux environments, either on our own systems or EC2 instances, or VPSes, or other such environments which support the
@AWegnerGitHub indicated in Charcoal HQ they’d test the docker instance yesterday. I did point them at my “Don’t Support Git Functions” warning approach for Windows runs - untested, but ultimately doesn’t require additional containerizaiton, etc. on the host system. And eliminates the git function issues that @AWegnerGitHub was complaining about.
This approach is in https://github.com/Charcoal-SE/SmokeDetector/tree/windows_git_warnings, also in PR #544, and one or both approaches may be useful enough for them.