1
0
mirror of https://github.com/httpie/cli.git synced 2025-08-10 22:42:05 +02:00

Introduce a mode to suppress all warnings (#1283)

This commit is contained in:
Batuhan Taskaya
2022-03-07 15:40:35 +03:00
committed by GitHub
parent c901e70463
commit 55087a901e
6 changed files with 59 additions and 6 deletions

View File

@@ -5,6 +5,7 @@ import sys
import time
import json
import tempfile
import warnings
from io import BytesIO
from pathlib import Path
from typing import Any, Optional, Union, List, Iterable
@@ -96,6 +97,7 @@ class MockEnvironment(Environment):
def cleanup(self):
self.stdout.close()
self.stderr.close()
warnings.resetwarnings()
if self._delete_config_dir:
assert self._temp_dir in self.config_dir.parents
from shutil import rmtree