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
@@ -11,11 +11,15 @@ RUN sed -i.bkp -e \
's/%sudo\s\+ALL=(ALL\(:ALL\)\?)\s\+ALL/%sudo ALL=NOPASSWD:ALL/g' \
/etc/sudoers
# Install pip and nose:
# Install pip:
RUN apt-get update && \
apt-get -q -y install python-pip && \
apt-get clean
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
RUN mkdir -p /home/lea/certbot
@@ -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"]