Skip to content

Conversation

@stephendonner
Copy link
Contributor

@kimberlythegeek @jrbenny35 r?

@stephendonner
Copy link
Contributor Author

Stephens-MacBook-Pro:axe-selenium-python stephendonner$ git push origin dockerignore
Counting objects: 3, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (2/2), done.
Writing objects: 100% (3/3), 331 bytes | 0 bytes/s, done.
Total 3 (delta 1), reused 0 (delta 0)
remote: Resolving deltas: 100% (1/1), completed with 1 local object.
To https://github.com/stephendonner/axe-selenium-python
 * [new branch]      dockerignore -> dockerignore
Stephens-MacBook-Pro:axe-selenium-python stephendonner$ docker build -t axe-selenium-python .
Sending build context to Docker daemon   1.15MB
Step 1/11 : FROM ubuntu:xenial
 ---> f975c5035748
Step 2/11 : ENV DEBIAN_FRONTEND=noninteractive   MOZ_HEADLESS=1   PIP_DISABLE_PIP_VERSION_CHECK=1
 ---> Using cache
 ---> ef874440aadf
Step 3/11 : RUN apt-get update   && apt-get install -y software-properties-common   && add-apt-repository ppa:deadsnakes/ppa   && apt-get update   && apt-get install -y bzip2 curl firefox git python2.7 python3.6 python3-pip   && rm -rf /var/lib/apt/lists/*
 ---> Using cache
 ---> 30ddd3983329
Step 4/11 : ENV FIREFOX_VERSION=59.0
 ---> Using cache
 ---> 7544b7d62e9c
Step 5/11 : RUN curl -fsSLo /tmp/firefox.tar.bz2 https://download-installer.cdn.mozilla.net/pub/firefox/releases/$FIREFOX_VERSION/linux-x86_64/en-US/firefox-$FIREFOX_VERSION.tar.bz2   && apt-get -y purge firefox   && rm -rf /opt/firefox   && tar -C /opt -xjf /tmp/firefox.tar.bz2   && rm /tmp/firefox.tar.bz2   && mv /opt/firefox /opt/firefox-$FIREFOX_VERSION   && ln -fs /opt/firefox-$FIREFOX_VERSION/firefox /usr/bin/firefox
 ---> Using cache
 ---> c391b19a53c0
Step 6/11 : ENV GECKODRIVER_VERSION=0.20.1
 ---> Using cache
 ---> df91640d4c3e
Step 7/11 : RUN curl -fsSLo /tmp/geckodriver.tar.gz https://github.com/mozilla/geckodriver/releases/download/v$GECKODRIVER_VERSION/geckodriver-v$GECKODRIVER_VERSION-linux64.tar.gz   && rm -rf /opt/geckodriver   && tar -C /opt -zxf /tmp/geckodriver.tar.gz   && rm /tmp/geckodriver.tar.gz   && mv /opt/geckodriver /opt/geckodriver-$GECKODRIVER_VERSION   && chmod 755 /opt/geckodriver-$GECKODRIVER_VERSION   && ln -fs /opt/geckodriver-$GECKODRIVER_VERSION /usr/bin/geckodriver
 ---> Using cache
 ---> 6dd7929296bb
Step 8/11 : ENV TOX_VERSION=3.0.0
 ---> Using cache
 ---> dac98bd19612
Step 9/11 : RUN pip3 install tox==$TOX_VERSION
 ---> Using cache
 ---> d65bd824001a
Step 10/11 : ADD . /src
 ---> b837850c23cc
Step 11/11 : WORKDIR /src
Removing intermediate container a1b3c057a440
 ---> a5366c00804e
Successfully built a5366c00804e
Successfully tagged axe-selenium-python:latest
Stephens-MacBook-Pro:axe-selenium-python stephendonner$ docker run -t axe-selenium-python tox
py27 create: /src/.tox/py27
py27 installdeps: -raxe_selenium_python/tests/requirements/tests.txt
py27 installed: attrs==17.4.0,certifi==2018.1.18,chardet==3.0.4,funcsigs==1.0.2,idna==2.6,more-itertools==4.1.0,pluggy==0.6.0,py==1.5.3,pytest==3.5.0,pytest-base-url==1.4.1,pytest-html==1.17.0,pytest-metadata==1.7.0,pytest-selenium==1.12.0,pytest-variables==1.7.1,requests==2.18.4,selenium==3.11.0,six==1.11.0,urllib3==1.22
py27 runtests: PYTHONHASHSEED='163816040'
py27 runtests: commands[0] | pytest
================================================================== test session starts ==================================================================
platform linux2 -- Python 2.7.12, pytest-3.5.0, py-1.5.3, pluggy-0.6.0 -- /src/.tox/py27/bin/python2.7
cachedir: .pytest_cache
sensitiveurl: .* *** WARNING: sensitive url matches https://web-mozillians-staging.production.paas.mozilla.community ***
driver: Firefox
metadata: {'Plugins': {'variables': '1.7.1', 'html': '1.17.0', 'selenium': '1.12.0', 'base-url': '1.4.1', 'metadata': '1.7.0'}, 'Capabilities': {}, 'Driver': 'Firefox', 'Platform': 'Linux-4.9.87-linuxkit-aufs-x86_64-with-Ubuntu-16.04-xenial', 'Base URL': 'https://web-mozillians-staging.production.paas.mozilla.community', 'Python': '2.7.12', 'Packages': {'pluggy': '0.6.0', 'py': '1.5.3', 'pytest': '3.5.0'}}
baseurl: https://web-mozillians-staging.production.paas.mozilla.community
rootdir: /src, inifile: tox.ini
plugins: variables-1.7.1, selenium-1.12.0, metadata-1.7.0, html-1.17.0, base-url-1.4.1
collected 3 items                                                                                                                                       

axe_selenium_python/tests/test_axe.py::test_execute PASSED                                                                                                          [ 33%]
axe_selenium_python/tests/test_axe.py::test_report PASSED                                                                                                           [ 66%]
axe_selenium_python/tests/test_axe.py::test_write_results PASSED                                                                                                    [100%]

======================================================================== 3 passed in 20.36 seconds ========================================================================
py36 create: /src/.tox/py36

@stephendonner
Copy link
Contributor Author

For posterity, this PR fixed this issue:

Stephens-MacBook-Pro:axe-selenium-python stephendonner$ docker run -e py27 -t axe-selenium-python tox
py27 recreate: /src/.tox/py27
py27 installdeps: -raxe_selenium_python/tests/requirements/tests.txt
py27 installed: attrs==17.4.0,certifi==2018.1.18,chardet==3.0.4,funcsigs==1.0.2,idna==2.6,more-itertools==4.1.0,pluggy==0.6.0,py==1.5.3,pytest==3.5.0,pytest-base-url==1.4.1,pytest-html==1.17.0,pytest-metadata==1.7.0,pytest-selenium==1.12.0,pytest-variables==1.7.1,requests==2.18.4,selenium==3.11.0,six==1.11.0,urllib3==1.22
py27 runtests: PYTHONHASHSEED='709120868'
py27 runtests: commands[0] | pytest
============================= test session starts ==============================
platform linux2 -- Python 2.7.12, pytest-3.5.0, py-1.5.3, pluggy-0.6.0 -- /src/.tox/py27/bin/python2.7
cachedir: .pytest_cache
driver: Firefox
sensitiveurl: .* *** WARNING: sensitive url matches https://web-mozillians-staging.production.paas.mozilla.community ***
metadata: {'Capabilities': {}, 'Driver': 'Firefox', 'Packages': {'py': '1.5.3', 'pytest': '3.5.0', 'pluggy': '0.6.0'}, 'Platform': 'Linux-4.9.87-linuxkit-aufs-x86_64-with-Ubuntu-16.04-xenial', 'Plugins': {'metadata': '1.7.0', 'base-url': '1.4.1', 'selenium': '1.12.0', 'html': '1.17.0', 'variables': '1.7.1'}, 'Python': '2.7.12', 'Base URL': 'https://web-mozillians-staging.production.paas.mozilla.community'}
baseurl: https://web-mozillians-staging.production.paas.mozilla.community
rootdir: /src, inifile: tox.ini
plugins: variables-1.7.1, selenium-1.12.0, metadata-1.7.0, html-1.17.0, base-url-1.4.1
collected 0 items / 1 errors                                                   

==================================== ERRORS ====================================
______________________________ ERROR collecting  _______________________________
.tox/py27/local/lib/python2.7/site-packages/py/_path/common.py:377: in visit
    for x in Visitor(fil, rec, ignore, bf, sort).gen(self):
.tox/py27/local/lib/python2.7/site-packages/py/_path/common.py:429: in gen
    for p in self.gen(subdir):
.tox/py27/local/lib/python2.7/site-packages/py/_path/common.py:419: in gen
    if p.check(dir=1) and (rec is None or rec(p))])
.tox/py27/local/lib/python2.7/site-packages/_pytest/main.py:434: in _recurse
    ihook = self.gethookproxy(path)
.tox/py27/local/lib/python2.7/site-packages/_pytest/main.py:338: in gethookproxy
    my_conftestmodules = pm._getconftestmodules(fspath)
.tox/py27/local/lib/python2.7/site-packages/_pytest/config.py:348: in _getconftestmodules
    mod = self._importconftest(conftestpath)
.tox/py27/local/lib/python2.7/site-packages/_pytest/config.py:376: in _importconftest
    raise ConftestImportFailure(conftestpath, sys.exc_info())
E   ConftestImportFailure: ImportMismatchError('axe_selenium_python.tests.conftest', '/Users/stephendonner/axe-selenium-python/axe_selenium_python/tests/conftest.py', local('/src/axe_selenium_python/tests/conftest.py'))
!!!!!!!!!!!!!!!!!!! Interrupted: 1 errors during collection !!!!!!!!!!!!!!!!!!!!
=========================== 1 error in 0.14 seconds ============================
ERROR: InvocationError for command '/src/.tox/py27/bin/pytest' (exited with code 2)
py36 recreate: /src/.tox/py36
py36 installdeps: -raxe_selenium_python/tests/requirements/tests.txt
py36 installed: attrs==17.4.0,certifi==2018.1.18,chardet==3.0.4,idna==2.6,more-itertools==4.1.0,pluggy==0.6.0,py==1.5.3,pytest==3.5.0,pytest-base-url==1.4.1,pytest-html==1.17.0,pytest-metadata==1.7.0,pytest-selenium==1.12.0,pytest-variables==1.7.1,requests==2.18.4,selenium==3.11.0,six==1.11.0,urllib3==1.22
py36 runtests: PYTHONHASHSEED='709120868'
py36 runtests: commands[0] | pytest
============================= test session starts ==============================
platform linux -- Python 3.6.4, pytest-3.5.0, py-1.5.3, pluggy-0.6.0 -- /src/.tox/py36/bin/python3.6
cachedir: .pytest_cache
driver: Firefox
sensitiveurl: .* *** WARNING: sensitive url matches https://web-mozillians-staging.production.paas.mozilla.community ***
metadata: {'Python': '3.6.4', 'Platform': 'Linux-4.9.87-linuxkit-aufs-x86_64-with-Ubuntu-16.04-xenial', 'Packages': {'pytest': '3.5.0', 'py': '1.5.3', 'pluggy': '0.6.0'}, 'Plugins': {'variables': '1.7.1', 'selenium': '1.12.0', 'metadata': '1.7.0', 'html': '1.17.0', 'base-url': '1.4.1'}, 'Base URL': 'https://web-mozillians-staging.production.paas.mozilla.community', 'Driver': 'Firefox', 'Capabilities': {}}
baseurl: https://web-mozillians-staging.production.paas.mozilla.community
rootdir: /src, inifile: tox.ini
plugins: variables-1.7.1, selenium-1.12.0, metadata-1.7.0, html-1.17.0, base-url-1.4.1
collected 0 items / 1 errors                                                   

==================================== ERRORS ====================================
______________________________ ERROR collecting  _______________________________
.tox/py36/lib/python3.6/site-packages/_pytest/config.py:334: in _getconftestmodules
    return self._path2confmods[path]
E   KeyError: local('/src/axe_selenium_python/tests')

During handling of the above exception, another exception occurred:
.tox/py36/lib/python3.6/site-packages/_pytest/config.py:365: in _importconftest
    return self._conftestpath2mod[conftestpath]
E   KeyError: local('/src/axe_selenium_python/tests/conftest.py')

During handling of the above exception, another exception occurred:
.tox/py36/lib/python3.6/site-packages/_pytest/config.py:371: in _importconftest
    mod = conftestpath.pyimport()
.tox/py36/lib/python3.6/site-packages/py/_path/local.py:686: in pyimport
    raise self.ImportMismatchError(modname, modfile, self)
E   py._path.local.LocalPath.ImportMismatchError: ('axe_selenium_python.tests.conftest', '/Users/stephendonner/axe-selenium-python/axe_selenium_python/tests/conftest.py', local('/src/axe_selenium_python/tests/conftest.py'))

During handling of the above exception, another exception occurred:
.tox/py36/lib/python3.6/site-packages/py/_path/common.py:377: in visit
    for x in Visitor(fil, rec, ignore, bf, sort).gen(self):
.tox/py36/lib/python3.6/site-packages/py/_path/common.py:429: in gen
    for p in self.gen(subdir):
.tox/py36/lib/python3.6/site-packages/py/_path/common.py:418: in gen
    dirs = self.optsort([p for p in entries
.tox/py36/lib/python3.6/site-packages/py/_path/common.py:419: in <listcomp>
    if p.check(dir=1) and (rec is None or rec(p))])
.tox/py36/lib/python3.6/site-packages/_pytest/main.py:434: in _recurse
    ihook = self.gethookproxy(path)
.tox/py36/lib/python3.6/site-packages/_pytest/main.py:338: in gethookproxy
    my_conftestmodules = pm._getconftestmodules(fspath)
.tox/py36/lib/python3.6/site-packages/_pytest/config.py:348: in _getconftestmodules
    mod = self._importconftest(conftestpath)
.tox/py36/lib/python3.6/site-packages/_pytest/config.py:376: in _importconftest
    raise ConftestImportFailure(conftestpath, sys.exc_info())
E   _pytest.config.ConftestImportFailure: ImportMismatchError('axe_selenium_python.tests.conftest', '/Users/stephendonner/axe-selenium-python/axe_selenium_python/tests/conftest.py', local('/src/axe_selenium_python/tests/conftest.py'))
!!!!!!!!!!!!!!!!!!! Interrupted: 1 errors during collection !!!!!!!!!!!!!!!!!!!!
=========================== 1 error in 0.18 seconds ============================
ERROR: InvocationError for command '/src/.tox/py36/bin/pytest' (exited with code 2)

@stephendonner stephendonner merged commit 35fe00e into django-commons:master Apr 13, 2018
@stephendonner stephendonner deleted the dockerignore branch April 13, 2018 19:40
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.

2 participants