Python simplejson._toggle_speedups() Examples

The following are code examples for showing how to use simplejson._toggle_speedups(). They are from open source Python projects. You can vote up the examples you like or vote down the ones you don't like.

Example 1
Project: FUTU_Stop_Loss   Author: BigtoC   File: __init__.py    MIT License 5 votes vote down vote up
def run(self, result):
        import simplejson
        simplejson._toggle_speedups(False)
        result = unittest.TestSuite.run(self, result)
        simplejson._toggle_speedups(True)
        return result 
Example 2
Project: tra-tracking-on-gae   Author: elliot79313   File: __init__.py    MIT License 5 votes vote down vote up
def run(self, result):
        import simplejson
        run = unittest.TestSuite.run
        run(self, result)
        if simplejson._import_c_make_encoder() is None:
            TestMissingSpeedups().run(result)
        else:
            simplejson._toggle_speedups(False)
            run(self, result)
            simplejson._toggle_speedups(True)
        return result 
Example 3
Project: ableton-live-webapi   Author: valsteen   File: __init__.py    The Unlicense 5 votes vote down vote up
def run(self, result):
        import simplejson
        simplejson._toggle_speedups(False)
        result = unittest.TestSuite.run(self, result)
        simplejson._toggle_speedups(True)
        return result 
Example 4
Project: fund   Author: Frank-qlu   File: __init__.py    Apache License 2.0 5 votes vote down vote up
def run(self, result):
        import simplejson
        simplejson._toggle_speedups(False)
        result = unittest.TestSuite.run(self, result)
        simplejson._toggle_speedups(True)
        return result 
Example 5
Project: oscars2016   Author: 0x0ece   File: __init__.py    Apache License 2.0 5 votes vote down vote up
def run(self, result):
        import simplejson
        simplejson._toggle_speedups(False)
        result = unittest.TestSuite.run(self, result)
        simplejson._toggle_speedups(True)
        return result 
Example 6
Project: that-startpage-rocks   Author: the-duck   File: __init__.py    GNU Lesser General Public License v3.0 5 votes vote down vote up
def run(self, result):
        import simplejson
        simplejson._toggle_speedups(False)
        result = unittest.TestSuite.run(self, result)
        simplejson._toggle_speedups(True)
        return result 
Example 7
Project: cohesive-networks-vns3-vpn-monitoring   Author: trek10inc   File: __init__.py    MIT License 5 votes vote down vote up
def run(self, result):
        import simplejson
        simplejson._toggle_speedups(False)
        result = unittest.TestSuite.run(self, result)
        simplejson._toggle_speedups(True)
        return result 
Example 8
Project: alfredToday   Author: jeeftor   File: __init__.py    MIT License 5 votes vote down vote up
def run(self, result):
        import simplejson
        simplejson._toggle_speedups(False)
        result = unittest.TestSuite.run(self, result)
        simplejson._toggle_speedups(True)
        return result 
Example 9
Project: old-dotfiles   Author: hawkw   File: __init__.py    MIT License 5 votes vote down vote up
def run(self, result):
        import simplejson
        run = unittest.TestSuite.run
        run(self, result)
        if simplejson._import_c_make_encoder() is None:
            TestMissingSpeedups().run(result)
        else:
            simplejson._toggle_speedups(False)
            run(self, result)
            simplejson._toggle_speedups(True)
        return result 
Example 10
Project: pureapp   Author: samisalkosuo   File: __init__.py    Apache License 2.0 5 votes vote down vote up
def run(self, result):
        import simplejson
        simplejson._toggle_speedups(False)
        result = unittest.TestSuite.run(self, result)
        simplejson._toggle_speedups(True)
        return result 
Example 11
Project: pureapp   Author: samisalkosuo   File: __init__.py    Apache License 2.0 5 votes vote down vote up
def run(self, result):
        import simplejson
        simplejson._toggle_speedups(False)
        result = unittest.TestSuite.run(self, result)
        simplejson._toggle_speedups(True)
        return result 
Example 12
Project: syntheticmass   Author: synthetichealth   File: __init__.py    Apache License 2.0 5 votes vote down vote up
def run(self, result):
        import simplejson
        simplejson._toggle_speedups(False)
        result = unittest.TestSuite.run(self, result)
        simplejson._toggle_speedups(True)
        return result