From da967a4e56dc44745378e46ea3653c470449eb56 Mon Sep 17 00:00:00 2001 From: Ammar Askar Date: Sun, 16 Jul 2017 01:14:18 -0700 Subject: [PATCH] Minor coverage improvement for packets --- minecraft/networking/connection.py | 3 ++- tests/test_serialization.py | 1 - 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/minecraft/networking/connection.py b/minecraft/networking/connection.py index 454a3fe..91aa612 100644 --- a/minecraft/networking/connection.py +++ b/minecraft/networking/connection.py @@ -410,7 +410,8 @@ class PacketReactor(object): state_name = None TIME_OUT = 0 - get_clientbound_packets = staticmethod(lambda context: set()) + # Handshaking is considered the "default" state + get_clientbound_packets = staticmethod(packets.state_handshake_clientbound) def __init__(self, connection): self.connection = connection diff --git a/tests/test_serialization.py b/tests/test_serialization.py index 4081af2..aaa6c69 100644 --- a/tests/test_serialization.py +++ b/tests/test_serialization.py @@ -1,7 +1,6 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- import unittest -import uuid from minecraft.networking.types import ( Type, Boolean, UnsignedByte, Byte, Short, UnsignedShort, Integer, VarInt, Long, Float, Double, ShortPrefixedByteArray,