diff options
| author | Tomasz Kramkowski <tomasz@kramkow.ski> | 2023-04-04 22:43:54 +0100 | 
|---|---|---|
| committer | Tomasz Kramkowski <tomasz@kramkow.ski> | 2023-04-04 22:43:54 +0100 | 
| commit | c491a361718d03b7eff3d3a69b48292354dcac54 (patch) | |
| tree | 63758878a5ac380ada226c5e65dd2827ea3aa165 /tests | |
| parent | 83697ed2e0bbadfd79607e349049861dd4d764d3 (diff) | |
| download | paste-c491a361718d03b7eff3d3a69b48292354dcac54.tar.gz paste-c491a361718d03b7eff3d3a69b48292354dcac54.tar.xz paste-c491a361718d03b7eff3d3a69b48292354dcac54.zip  | |
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/test_cli.py | 10 | 
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()  | 
