From 05f1d6294aefecb3fc4c3f0d4c1fd49d5d08fcff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20Ma=C5=9Blanka?= <piotr.maslanka@henrietta.com.pl> Date: Wed, 26 May 2021 21:33:14 +0200 Subject: [PATCH] 100% coverage --- minijson.pyx | 8 ++++---- setup.py | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/minijson.pyx b/minijson.pyx index fa54d2a..378752e 100644 --- a/minijson.pyx +++ b/minijson.pyx @@ -351,14 +351,14 @@ cpdef int dump(object data, cio: io.BytesIO) except -1: cio.write(b'\x05') cio.write(STRUCT_H.pack(data)) return 3 - elif -2147483648 <= data <= 2147483647: # signed int, type 1 - cio.write(b'\x01') - cio.write(STRUCT_l.pack(data)) - return 5 elif 0 <= data <= 0xFFFFFF: # unsigned 3byte, type 12 cio.write(b'\x0C') cio.write(STRUCT_L.pack(data)[1:]) return 4 + elif -2147483648 <= data <= 2147483647: # signed int, type 1 + cio.write(b'\x01') + cio.write(STRUCT_l.pack(data)) + return 5 elif 0 <= data <= 0xFFFFFFFF: # unsigned int, type 4 cio.write(b'\x04') cio.write(STRUCT_L.pack(data)) diff --git a/setup.py b/setup.py index 45111ee..4838669 100644 --- a/setup.py +++ b/setup.py @@ -1,9 +1,9 @@ import os -from distutils.core import setup from distutils.extension import Extension from Cython.Build import cythonize from Cython.Compiler.Options import get_directive_defaults +from distutils.core import setup directive_defaults = get_directive_defaults() directive_defaults['language_level'] = '3' -- GitLab