Browse Source

move mock to only where it's needed for tests

drop unneeded module..
python2
John-Mark Gurney 5 years ago
parent
commit
7faef04fd4
1 changed files with 1 additions and 2 deletions
  1. +1
    -2
      pasn1.py

+ 1
- 2
pasn1.py View File

@@ -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)



Loading…
Cancel
Save