-
Notifications
You must be signed in to change notification settings - Fork 93
Conversation
vitalk
commented
Jul 24, 2016
Hi @fuhrysteve! This changes looks good for me. But live_server_subprocess fixture can be always available (not only when pytest-service is exists).
It would be great if live_server_subprocess fixture can detect missed requirements as well (such as flask>=0.11.0 or pytest-service) and skip tests with helpful message.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Example.com, example.net, example.org, and example.edu are second-level domain names reserved for documentation purposes and examples of the use of domain names.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll change it back - I was just trying to get the line to squeeze into 80 chars so my pep8 checker would stop complaining :)
vitalk
commented
Jul 24, 2016
Use the separate --start-live-server-subprocess option to run live_server fixture as subprocess is another suggestion. Any thoughts?
@vitalk So I think the issue with always making live_server_subprocess always available is I'm not sure off the top of my head how to do that without making all tests fail at collection time - the reason is that watcher_getter would fail because it says it can't find a fixture with that name.
So I'm not sure how to make it optionally available unless there's some way I'm not aware of to get a fixture at runtime.
Any suggestions?
fuhrysteve
commented
Jul 24, 2016
@vitalk with regards to --start-live-server-subprocess, sounds like a good idea to me - i'll add it in.
vitalk
commented
Jul 24, 2016
the reason is that
watcher_getterwould fail because it says it can't find a fixture with that name
I missed that part, maybe I can find a workaround.
Uh oh!
There was an error while loading. Please reload this page.
Please don't merge this yet. There is still one test that is not passing for a mysterious reason, and additionally this code still needs test cases of its own.
I'm working on a way to launch flask as a completely separate process using
os.forkby way ofwatcher_getter(from pytest-services).The reason I need to use this strategy is that SQLAlchemy configurations become considerably more complex when you have to deal with multiprocessing (see docs). I was struggling to get it to work in my existing configuration, and this seemed like the easier option.
Let me know if you have any initial feedback and I'll circle back. Thanks @vitalk!