Switch from nose to pytest (#5282)

* Use pipstrap to install a good version of pip

* Use pytest in cb-auto tests

* Remove nose usage in auto_test.py

* remove nose dev dep

* use pytest in test_tests

* Use pytest in tox

* Update dev dependency pinnings

* remove nose multiprocess lines

* Use pytest for coverage

* Use older py and pytest for old python versions

* Add test for Error.__str__

* pin pytest in oldest test

* Fix tests for DNS-DO plugin on py26

* Work around bug for Python 3.3

* Clarify dockerfile comments
This commit is contained in:
Brad Warren
2017-12-01 10:59:55 -08:00
committed by GitHub
parent d246ba78c7
commit 48173ed1cb
25 changed files with 74 additions and 79 deletions
+7 -3
View File
@@ -5,9 +5,13 @@ FROM centos:6
RUN yum install -y epel-release
# Install pip, sudo and nose:
# Install pip and sudo:
RUN yum install -y python-pip sudo
RUN pip install nose
# Use pipstrap to update to a stable and tested version of pip
COPY ./pieces/pipstrap.py /opt
RUN /opt/pipstrap.py
# Pin pytest version for increased stability
RUN pip install pytest==3.2.5
# Add an unprivileged user:
RUN useradd --create-home --home-dir /home/lea --shell /bin/bash --groups wheel --uid 1000 lea
@@ -29,4 +33,4 @@ COPY . /home/lea/certbot/letsencrypt-auto-source
USER lea
WORKDIR /home/lea
CMD ["nosetests", "-v", "-s", "certbot/letsencrypt-auto-source/tests"]
CMD ["pytest", "-v", "-s", "certbot/letsencrypt-auto-source/tests"]