Skip to content

Commit 3dc700a

Browse files
committed
Merge branch 'master' of github.com:pykler/yajl-py
2 parents 4212e9e + ea1c2d9 commit 3dc700a

File tree

4 files changed

+13
-3
lines changed

4 files changed

+13
-3
lines changed

README.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ To run the tests you also require:
2020

2121
- make (to run `make test`)
2222
- nose (debian package == `python-nose`)
23+
- MiniMockTest (`pip install minimocktest`)
2324

2425
Install
2526
-------

tests/test_yajl.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
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
25

36
class BaseContentHandler(yajl.YajlContentHandler):
47
def yajl_null(self, ctx):
@@ -238,7 +241,7 @@ def test_get_yajl_version_correctlyParsesYajlVersion(self):
238241

239242
def test_check_yajl_version_warnsOnlyWhenMismatchedVersions(self):
240243
import warnings
241-
self.mock('warnings.warn', [locals()])
244+
self.mock('warnings.warn')
242245
self.mock('yajl.__version__', mock_obj='1.1.1')
243246
self.mock('yajl.yajl_version', mock_obj='1.1.1')
244247
self.assertTrue(yajl.check_yajl_version())

tests/test_yajl_c.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
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
25
import difflib
36

47
class YajlCTestContentHandler(yajl.YajlContentHandler):

tests/yajl_test_lib.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
'''
2+
Helper module to import yajl from parent src dir
3+
'''
14
import os
25
import sys
36
BASEPATH = os.path.dirname(os.path.realpath(__file__))

0 commit comments

Comments
 (0)