File tree Expand file tree Collapse file tree 4 files changed +13
-3
lines changed Expand file tree Collapse file tree 4 files changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -20,6 +20,7 @@ To run the tests you also require:
20
20
21
21
- make (to run `make test `)
22
22
- nose (debian package == `python-nose `)
23
+ - MiniMockTest (`pip install minimocktest `)
23
24
24
25
Install
25
26
-------
Original file line number Diff line number Diff line change 1
- from yajl_test_lib import *
1
+ from yajl_test_lib import yajl
2
+ from minimocktest import MockTestCase
3
+ from StringIO import StringIO
4
+ import sys
2
5
3
6
class BaseContentHandler (yajl .YajlContentHandler ):
4
7
def yajl_null (self , ctx ):
@@ -238,7 +241,7 @@ def test_get_yajl_version_correctlyParsesYajlVersion(self):
238
241
239
242
def test_check_yajl_version_warnsOnlyWhenMismatchedVersions (self ):
240
243
import warnings
241
- self .mock ('warnings.warn' , [ locals ()] )
244
+ self .mock ('warnings.warn' )
242
245
self .mock ('yajl.__version__' , mock_obj = '1.1.1' )
243
246
self .mock ('yajl.yajl_version' , mock_obj = '1.1.1' )
244
247
self .assertTrue (yajl .check_yajl_version ())
Original file line number Diff line number Diff line change 1
- from yajl_test_lib import *
1
+ from yajl_test_lib import yajl , BASEPATH
2
+ from minimocktest import MockTestCase
3
+ from StringIO import StringIO
4
+ import os
2
5
import difflib
3
6
4
7
class YajlCTestContentHandler (yajl .YajlContentHandler ):
Original file line number Diff line number Diff line change
1
+ '''
2
+ Helper module to import yajl from parent src dir
3
+ '''
1
4
import os
2
5
import sys
3
6
BASEPATH = os .path .dirname (os .path .realpath (__file__ ))
You can’t perform that action at this time.
0 commit comments