Did I find the right examples for you? yes no

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

src/p/o/pony-HEAD/pony/orm/tests/test_db_session.py   pony(Download)
    def test_db_session_4(self):
        with db_session:
            with db_session:
                self.X(a=3, b=3)
        with db_session:
        def test():
            self.X(a=3, b=3)
        test()
        with db_session:
            self.assertEqual(count(x for x in self.X), 3)
 
    def test_db_session_decorator_2(self):
        @db_session
        def test():
            self.X(a=3, b=3)
        def test():
            self.X(a=3, b=3)
            1/0
        try:
            test()
        def test():
            self.X(a=3, b=3)
            1/0
        try:
            test()

src/p/o/pony-0.5-beta/pony/orm/tests/test_db_session.py   pony(Download)
    def test_db_session_4(self):
        with db_session:
            with db_session:
                self.X(a=3, b=3)
        with db_session:
        def test():
            self.X(a=3, b=3)
        test()
        with db_session:
            self.assertEqual(count(x for x in self.X), 3)
 
    def test_db_session_decorator_2(self):
        @db_session
        def test():
            self.X(a=3, b=3)
        def test():
            self.X(a=3, b=3)
            1/0
        try:
            test()
        def test():
            self.X(a=3, b=3)
            1/0
        try:
            test()