kopia lustrzana https://github.com/Yakifo/amqtt
disable colorized cli output for test_cli
rodzic
0a50ff02ce
commit
82fe0f0ca1
|
@ -9,7 +9,8 @@ except ImportError:
|
|||
UTC = timezone.utc
|
||||
|
||||
from struct import unpack
|
||||
from typing_extensions import Generic, Self, TypeVar
|
||||
from typing import Generic
|
||||
from typing_extensions import Self, TypeVar
|
||||
|
||||
from amqtt.adapters import ReaderAdapter, WriterAdapter
|
||||
from amqtt.codecs_amqtt import bytes_to_hex_str, decode_packet_id, int_to_bytes, read_or_raise
|
||||
|
|
|
@ -56,18 +56,21 @@ async def broker(config_file):
|
|||
|
||||
def test_cli_help_messages():
|
||||
"""Test that help messages are displayed correctly."""
|
||||
env = os.environ.copy()
|
||||
env['NO_COLOR'] = "1"
|
||||
|
||||
amqtt_path = "amqtt"
|
||||
output = subprocess.check_output([amqtt_path, "--help"])
|
||||
output = subprocess.check_output([amqtt_path, "--help"], env=env)
|
||||
assert "Usage: amqtt" in output.decode("utf-8")
|
||||
|
||||
|
||||
amqtt_sub_path = "amqtt_sub"
|
||||
output = subprocess.check_output([amqtt_sub_path, "--help"])
|
||||
output = subprocess.check_output([amqtt_sub_path, "--help"], env=env)
|
||||
assert "Usage: amqtt_sub" in output.decode("utf-8")
|
||||
|
||||
|
||||
amqtt_pub_path = "amqtt_pub"
|
||||
output = subprocess.check_output([amqtt_pub_path, "--help"])
|
||||
output = subprocess.check_output([amqtt_pub_path, "--help"], env=env)
|
||||
assert "Usage: amqtt_pub" in output.decode("utf-8")
|
||||
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue