Fix some pylint warnings in the tests
This commit is contained in:
parent
5fc10563f6
commit
1a1db393c1
|
@ -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)
|
||||||
|
|
||||||
|
|
|
@ -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:
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
"""Tests for structures"""
|
||||||
import unittest
|
import unittest
|
||||||
import struct
|
import struct
|
||||||
from binascii import unhexlify
|
from binascii import unhexlify
|
||||||
|
|
Loading…
Reference in New Issue
Block a user