Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make it usable as library (with passed in config) #53

Open
blueyed opened this issue Sep 15, 2015 · 3 comments
Open

Make it usable as library (with passed in config) #53

blueyed opened this issue Sep 15, 2015 · 3 comments

Comments

@blueyed
Copy link

blueyed commented Sep 15, 2015

I think stellar might be a good option for a (Django) test suite, where you want to rollback to a previous state (including data migrations - Django would flush the tables, but keep the schema migrated).

For this to be usable from the tests (without stellar init and a config file), it would be required to allow for passing in options to Stellar for example.

What do you think about that?
I'd be happy to prepare a PR for this.

@Teemu
Copy link
Contributor

Teemu commented Sep 16, 2015

Overriding Stellar's __init__ and load_config might do the trick. I will happily merge such PR that makes it any easier to use it without the cmd line app.

@funkyHat
Copy link

funkyHat commented Apr 5, 2018

I had a stab at this but found that stellar's behaviour of os.fork()ing in order to do the snapshots tripped me up in my use case (also testing, and involving pdb. It resulted in several pdb prompts on the same console (i.e. unusable))
For the time being I've resorted to running stellar through subprocess with a generated stellar.yaml

@Teemu
Copy link
Contributor

Teemu commented Apr 5, 2018

Oh yeah the os.fork() must be a tricky one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants