Fix some pylint warnings in the tests

This commit is contained in:
Lee Miller 2023-08-02 00:15:00 +03:00
parent 5fc10563f6
commit 1a1db393c1
Signed by untrusted user: lee.miller
GPG Key ID: 4F97A5EA88F4AB63
3 changed files with 6 additions and 3 deletions

View File

@ -1,10 +1,11 @@
"""Tests for messages"""
import unittest import unittest
from binascii import unhexlify from binascii import unhexlify
from minode import message from minode import message
magic = 0xE9BEB4D9 MAGIC = 0xE9BEB4D9
# 500 identical peers: # 500 identical peers:
# import ipaddress # import ipaddress
@ -26,7 +27,7 @@ class TestMessage(unittest.TestCase):
def test_packet(self): def test_packet(self):
"""Check the packet created by message.Message()""" """Check the packet created by message.Message()"""
head = unhexlify(b'%x' % magic) head = unhexlify(b'%x' % MAGIC)
self.assertEqual( self.assertEqual(
message.Message(b'ping', b'').to_bytes()[:len(head)], head) message.Message(b'ping', b'').to_bytes()[:len(head)], head)

View File

@ -1,3 +1,4 @@
"""Blind tests, starting the minode process"""
import unittest import unittest
import signal import signal
import subprocess import subprocess
@ -42,7 +43,7 @@ class TestProcessProto(unittest.TestCase):
@classmethod @classmethod
def tearDownClass(cls): def tearDownClass(cls):
"""Ensures that pybitmessage stopped and removes files""" """Ensures that process stopped and removes files"""
try: try:
if not cls._stop_process(10): if not cls._stop_process(10):
try: try:

View File

@ -1,3 +1,4 @@
"""Tests for structures"""
import unittest import unittest
import struct import struct
from binascii import unhexlify from binascii import unhexlify