From 7faef04fd4bfeb0e14722f346ee17f0198955221 Mon Sep 17 00:00:00 2001 From: John-Mark Gurney Date: Sat, 25 May 2019 21:22:11 -0700 Subject: [PATCH] move mock to only where it's needed for tests drop unneeded module.. --- pasn1.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pasn1.py b/pasn1.py index 915d948..c1f6312 100644 --- a/pasn1.py +++ b/pasn1.py @@ -44,9 +44,7 @@ __license__ = '2-clause BSD license' import datetime import math -import mock import os -import pdb import sys import unittest @@ -532,6 +530,7 @@ class TestCode(unittest.TestCase): self.assertRaises(ValueError, loads, v.decode('hex')) def test_invalid_floats(self): + import mock with mock.patch('math.frexp', return_value=(.87232, 1 << 23)): self.assertRaises(ValueError, dumps, 1.1)