[issue40372] doctest example programs should exit 1 if any test fails
New submission from Andreas Sommer : Documentation recommends calling `doctest.testmod()`, but exits with code 0 even if a test fails. -- assignee: docs@python components: Documentation messages: 367086 nosy: Andreas Sommer, docs@python priority: normal severity: normal status: open title: doctest example programs should exit 1 if any test fails type: enhancement versions: Python 2.7, Python 3.5, Python 3.6, Python 3.7, Python 3.8, Python 3.9 ___ Python tracker <https://bugs.python.org/issue40372> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23750] Clarify difference between os.system/subprocess.call in section "Replacing os.system()"
New submission from Andreas Sommer: Reading over the section "Replacing os.system()" (https://docs.python.org/2/library/subprocess.html#replacing-os-system), one might assume that the return value of os.system and subprocess.call are equivalent. status = os.system("mycmd" + " myarg") # becomes status = subprocess.call("mycmd" + " myarg", shell=True) However, they are not. Example: import sys import os import subprocess print subprocess.call("false") print os.system("false") gives 1 and 256, respectively. Maybe this could be rephrased for clarity, or a hint added. -- assignee: docs@python components: Documentation messages: 239028 nosy: Andreas Sommer, docs@python priority: normal severity: normal status: open title: Clarify difference between os.system/subprocess.call in section "Replacing os.system()" type: enhancement ___ Python tracker <http://bugs.python.org/issue23750> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com