How to use the simpleeval.DISALLOW_METHODS function in simpleeval

To help you get started, we’ve selected a few simpleeval examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github danthedeckie / simpleeval / test_simpleeval.py View on Github external
def test_methods(self):
        self.t('"WORD".lower()', 'word')
        x = simpleeval.DISALLOW_METHODS
        simpleeval.DISALLOW_METHODS = []
        self.t('"{}:{}".format(1, 2)', '1:2')
        simpleeval.DISALLOW_METHODS = x
github danthedeckie / simpleeval / test_simpleeval.py View on Github external
def test_methods(self):
        self.t('"WORD".lower()', 'word')
        x = simpleeval.DISALLOW_METHODS
        simpleeval.DISALLOW_METHODS = []
        self.t('"{}:{}".format(1, 2)', '1:2')
        simpleeval.DISALLOW_METHODS = x
github danthedeckie / simpleeval / test_simpleeval.py View on Github external
def test_methods(self):
        self.t('"WORD".lower()', 'word')
        x = simpleeval.DISALLOW_METHODS
        simpleeval.DISALLOW_METHODS = []
        self.t('"{}:{}".format(1, 2)', '1:2')
        simpleeval.DISALLOW_METHODS = x