coderedcorp / django-sass

The absolute simplest way to use Sass with Django. Pure Python, minimal dependencies, no special configuration required!
Other
72 stars 7 forks source link

Couldn't run tests #16

Open zobweyt opened 1 year ago

zobweyt commented 1 year ago

I've just cloned repo, installed dev requirements to venv and tried to run pytest

Error message: ImportError: Couldn't import Django. Are you sure it's installed and available on your PYTHONPATH environment variable? Did you forget to activate a virtual environment?

platform win32 -- Python 3.11.1, pytest-7.2.0, pluggy-1.0.0
django: settings: testproject.settings (from env)
rootdir: C:\Users\leoni\source\repos\django-sass, configfile: setup.cfg
plugins: cov-4.0.0, django-4.5.2
collected 8 items

testproject\tests.py FFFFs..F
vsalvino commented 1 year ago

That should probably get added to our requirements-dev.txt file. Looks like the pipeline is a bit out of date as well, testing on Python 3.9

You should be able to pip install django. There's a chance the newest version might not work since it has not been tested - if that happens to be the case, try Django 3.2.

vsalvino commented 1 year ago

Actually, ignore that. Django should be getting installed. Did you run pytest ./testproject/ ?

zobweyt commented 1 year ago

I've tried to run pytest and pytest ./testproject/ on both 3.11 and 3.8. Same issue happens with the following installations:

platform win32 -- Python 3.8.10, pytest-7.2.1, pluggy-1.0.0
django: settings: testproject.settings (from ini)
rootdir: C:\Users\leoni\source\repos\django-sass, configfile: setup.cfg
plugins: cov-4.0.0, django-4.2.0

ImportError: Couldn't import Django. Are you sure it's installed and available on your PYTHONPATH environment variable? Did you forget to activate a virtual environment?
zobweyt commented 1 year ago

It seems to me that the problem is in the compatibility of the installed packages from requirements-dev.txt. Shouldn't package versions be specified explicitly?

zobweyt commented 1 year ago

Is there any progress on this topic?