mozilla-releng / signingscript

Signing script to run in scriptworker.
1 stars 11 forks source link

local tests busted for me #108

Closed escapewindow closed 5 years ago

escapewindow commented 5 years ago

I think since 632919f237d6de0dcbab2f6f524a09f1c39d7d61 .

e.g.

py36 inst-nodeps: /Users/asasaki/src/releng/signingscript/.tox/.tmp/package/1/signingscript-10.1.0.zip
py36 installed: aiohttp==3.5.4,arrow==0.13.2,asn1crypto==0.24.0,async-timeout==3.0.1,atomicwrites==1.3.0,attrs==19.1.0,backports.lzma==0.0.13,certifi==2019.3.9,cffi==1.12.3,chardet==3.0.4,Click==7.0,construct==2.9.45,coverage==4.5.3,cryptography==2.7,datadog==0.28.0,decorator==4.4.0,defusedxml==0.6.0,entrypoints==0.3,flake8==3.7.7,flake8-docstrings==1.3.0,flake8-polyfill==1.0.2,frozendict==1.2,idna==2.8,idna-ssl==1.1.0,importlib-metadata==0.17,jsonschema==3.0.1,mar==3.1.0,mccabe==0.6.1,mock==3.0.5,mohawk==1.0.0,more-itertools==7.0.0,multidict==4.5.2,pexpect==4.7.0,pip-compile-multi==1.4.0,pip-tools==3.7.0,pluggy==0.12.0,ptyprocess==0.6.0,py==1.8.0,pycodestyle==2.5.0,pycparser==2.19,pydocstyle==3.0.0,pyflakes==2.1.1,pyrsistent==0.15.2,pytest==4.5.0,pytest-asyncio==0.10.0,pytest-cov==2.7.1,pytest-mock==1.10.4,python-dateutil==2.8.0,python-gnupg==0.4.4,requests==2.22.0,requests-hawk==1.0.0,scriptworker==0.6.0,signingscript==10.1.0,signtool==4.0.0,six==1.12.0,slugid==2.0.0,snowballstemmer==1.2.1,taskcluster==7.0.1,taskcluster-urls==11.0.0,toposort==1.5,typing-extensions==3.7.2,urllib3==1.25.3,virtualenv==16.6.0,wcwidth==0.1.7,yarl==1.3.0,zipp==0.5.1

...

_________________ ERROR collecting signingscript/test/integration/test_autograph.py __________________
ImportError while importing test module '/Users/asasaki/src/releng/signingscript/signingscript/test/integration/test_autograph.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
.tox/py36/lib/python3.6/site-packages/_pytest/python.py:512: in _importtestmodule
    mod = self.fspath.pyimport(ensuresyspath=importmode)
.tox/py36/lib/python3.6/site-packages/py/_path/local.py:701: in pyimport
    __import__(modname)
signingscript/test/__init__.py:5: in <module>
    from scriptworker.context import Context
E   ModuleNotFoundError: No module named 'scriptworker'

First, why am I installing scriptworker==0.6.0? Second, why can't I find the scriptworker module?

@rail is tox working for you locally?

rail commented 5 years ago

Hmm, this is weird... I usually use docker to run tox test, something like this:

docker run -ti -v $PWD:/src python:3.6 /bin/bash
apt update
apt install apt-get install zipalign openjdk-8-jdk-headless
pip install tox
cd /src 
tox -e py36

The same for py37.

It's scriptworker==23.0.7 here. Maybe try to kill the .tox directory? I'm not sure if tox is smart enough to detect a newer version of scriptworker if it's already installed and the version is not explicit (like in the base.in file).

rail commented 5 years ago

I vaguely remember that tox treats differently explicitly listed packages in the deps section and the ones coming from a file using -r, as I changed in that PR.