Browse Source

use included mock, use extras_require for coverage.

main
John-Mark Gurney 2 years ago
parent
commit
c6c64510b4
3 changed files with 7 additions and 3 deletions
  1. +1
    -1
      pasn1.py
  2. +3
    -2
      requirements.txt
  3. +3
    -0
      setup.py

+ 1
- 1
pasn1.py View File

@@ -562,7 +562,7 @@ class TestCode(unittest.TestCase):
self.assertRaises(ValueError, loads, bytes.fromhex(v))

def test_invalid_floats(self):
import mock
from unittest import mock
with mock.patch('math.frexp', return_value=(.87232, 1 << 23)):
self.assertRaises(ValueError, dumps, 1.1)



+ 3
- 2
requirements.txt View File

@@ -1,2 +1,3 @@
coverage
mock
-e .

-e .[dev]

+ 3
- 0
setup.py View File

@@ -17,4 +17,7 @@ setup(name='pasn1',
'Programming Language :: Python',
'Topic :: Software Development :: Libraries :: Python Modules',
],
extras_require = {
'dev': [ 'coverage' ],
},
)

Loading…
Cancel
Save