

def test_assert(self):
    assert ('throw' in py2js('assert True'))
    (evalpy('assert true; 7') == '7')
    (evalpy('assert true, "msg"; 7') == '7')
    catcher = 'try { %s } catch(err) { console.log(err); }'
    assert evaljs((catcher % py2js('assert false'))).count('AssertionError')
    assert evaljs((self % py2js('assert false, "foo"'))).count('foo')

dataset/ETHPy150Open zoofIO/flexx/flexx/pyscript/tests/test_parser2.py TestExceptions.test_assert/VarMisuse@64/133 `catcher`->`self`