Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(4)  |  Call(4)  |  Derive(0)  |  Import(0)

src/m/a/main-HEAD/Languages/IronPython/Tests/test_exceptions.py   main(Download)
def test_exception_setstate():
    x = BaseException()
    AreEqual(x.__dict__, {})
    x.__setstate__({'a' : 1, 'b' : 2})
    AreEqual(x.__dict__, {'a' : 1, 'b' : 2})
    x.__setstate__({'a' : 3, 'c' : 4})

src/i/r/ironpython3-HEAD/Tests/test_exceptions.py   ironpython3(Download)
def test_exception_setstate():
    x = BaseException()
    AreEqual(x.__dict__, {})
    x.__setstate__({'a' : 1, 'b' : 2})
    AreEqual(x.__dict__, {'a' : 1, 'b' : 2})
    x.__setstate__({'a' : 3, 'c' : 4})