aboutsummaryrefslogtreecommitdiffstats
path: root/tests/test_cli.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_cli.py')
-rw-r--r--tests/test_cli.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/tests/test_cli.py b/tests/test_cli.py
index 6f3beb2..5e0acb3 100644
--- a/tests/test_cli.py
+++ b/tests/test_cli.py
@@ -1,12 +1,14 @@
+from io import StringIO
+
from paste.__main__ import main
-def test_cli(monkeypatch, capfd):
+def test_cli(monkeypatch):
monkeypatch.setattr("paste.__main__.db", None)
monkeypatch.setattr("paste.__main__.application", None)
monkeypatch.setattr("paste.__main__.store", None)
monkeypatch.setenv("PASTE_DB", "test_value")
- main(["paste", "--help"])
- _, err = capfd.readouterr()
- assert "paste" in err
+ buf = StringIO()
+ main(["paste", "--help"], stderr=buf)
+ assert "paste" in buf.getvalue()