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

Adding poetry and Django test structure #5

Merged
merged 1 commit into from
Oct 6, 2018

Conversation

rjauquet
Copy link
Contributor

@rjauquet rjauquet commented Oct 4, 2018

Added some ideas for test infrastructure. Open to other suggestions!

After installing poetry:

poetry install
poetry run ./manage.py test

The test isn't really checking anything important but I wanted to make sure all the importing logic and calling worked.

@ramonsaraiva
Copy link
Owner

ramonsaraiva commented Oct 5, 2018

That's pretty cool. I'm not really familar with poetry, could you explain me what are those dependencies in that lock file?

@rjauquet
Copy link
Contributor Author

rjauquet commented Oct 5, 2018

Yeah! Poetry is a dependency manager, and the lock file just guarantees each person setting up the code gets exactly the same dependency list on the same version on python. It's not strictly necessary but it can save some headaches for sure.

@ramonsaraiva
Copy link
Owner

Yup! I get that, but, I see there are a few dependencies already defined in the file, besides Django.
Are those dependencies of Django itself? Or they were added mistakenly?

@rjauquet
Copy link
Contributor Author

rjauquet commented Oct 5, 2018

Sorry, I misunderstood. Yes. Absolutely we don't need Pytest. I removed it now. The lock should just be sub-dependencies of Django

@ramonsaraiva ramonsaraiva merged commit a94dd07 into ramonsaraiva:master Oct 6, 2018
@ramonsaraiva ramonsaraiva mentioned this pull request Oct 8, 2018
@AhmedRedaAmin
Copy link
Contributor

hey @rjauquet can you help me out with something ?
selection_066
I can't understand why it is failing here ?
The virtualenv is part of poetry's setup AFAIK .

@rjauquet
Copy link
Contributor Author

Yes, the poetry setup should create the virtualenv. I just tried this locally and was able to get it working. I'm wondering if poetry was installed with an incompatible version of python. Could you try sourcing into the virtualenv directly and then running ./manage.py test?

source /root/.cache/pypoetry/virtualenvs/django-expiry-py3.6/bin/activate
./manage.py test

I think is your path. How did you install poetry?

@AhmedRedaAmin
Copy link
Contributor

@rjauquet , no worries , I managed to resolve it , seems when you use sudo , it instantiates the virtualenv in a different location than it normally does .

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

Successfully merging this pull request may close these issues.

None yet

3 participants