✘✘ 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.84
𝗢𝗣𝗧𝗜𝗢𝗡𝗦 ♯ CRL ♯➤ 𝗢𝗞 ┃ WGT ♯➤ 𝗢𝗞 ┃ SDO ♯➤ 𝗢𝗙𝗙 ┃ PKEX ♯➤ 𝗢𝗙𝗙
𝗗𝗘𝗔𝗖𝗧𝗜𝗩𝗔𝗧𝗘𝗗 ♯➤ 𝗔𝗟𝗟 𝗪𝗢𝗥𝗞𝗜𝗡𝗚....

𝗛𝗢𝗠𝗘
𝗖𝗨𝗥𝗥𝗘𝗡𝗧 𝗙𝗜𝗟𝗘 : /opt/alt/python27/lib64/python2.7/bsddb/test//test_join.py
"""TestCases for using the DB.join and DBCursor.join_item methods.
"""

import os

import unittest

from test_all import db, dbshelve, test_support, verbose, \
        get_new_environment_path, get_new_database_path

#----------------------------------------------------------------------

ProductIndex = [
    ('apple', "Convenience Store"),
    ('blueberry', "Farmer's Market"),
    ('shotgun', "S-Mart"),              # Aisle 12
    ('pear', "Farmer's Market"),
    ('chainsaw', "S-Mart"),             # "Shop smart.  Shop S-Mart!"
    ('strawberry', "Farmer's Market"),
]

ColorIndex = [
    ('blue', "blueberry"),
    ('red', "apple"),
    ('red', "chainsaw"),
    ('red', "strawberry"),
    ('yellow', "peach"),
    ('yellow', "pear"),
    ('black', "shotgun"),
]

class JoinTestCase(unittest.TestCase):
    keytype = ''

    def setUp(self):
        self.filename = self.__class__.__name__ + '.db'
        self.homeDir = get_new_environment_path()
        self.env = db.DBEnv()
        self.env.open(self.homeDir, db.DB_CREATE | db.DB_INIT_MPOOL | db.DB_INIT_LOCK )

    def tearDown(self):
        self.env.close()
        test_support.rmtree(self.homeDir)

    def test01_join(self):
        if verbose:
            print '\n', '-=' * 30
            print "Running %s.test01_join..." % \
                  self.__class__.__name__

        # create and populate primary index
        priDB = db.DB(self.env)
        priDB.open(self.filename, "primary", db.DB_BTREE, db.DB_CREATE)
        map(lambda t, priDB=priDB: priDB.put(*t), ProductIndex)

        # create and populate secondary index
        secDB = db.DB(self.env)
        secDB.set_flags(db.DB_DUP | db.DB_DUPSORT)
        secDB.open(self.filename, "secondary", db.DB_BTREE, db.DB_CREATE)
        map(lambda t, secDB=secDB: secDB.put(*t), ColorIndex)

        sCursor = None
        jCursor = None
        try:
            # lets look up all of the red Products
            sCursor = secDB.cursor()
            # Don't do the .set() in an assert, or you can get a bogus failure
            # when running python -O
            tmp = sCursor.set('red')
            self.assertTrue(tmp)

            # FIXME: jCursor doesn't properly hold a reference to its
            # cursors, if they are closed before jcursor is used it
            # can cause a crash.
            jCursor = priDB.join([sCursor])

            if jCursor.get(0) != ('apple', "Convenience Store"):
                self.fail("join cursor positioned wrong")
            if jCursor.join_item() != 'chainsaw':
                self.fail("DBCursor.join_item returned wrong item")
            if jCursor.get(0)[0] != 'strawberry':
                self.fail("join cursor returned wrong thing")
            if jCursor.get(0):  # there were only three red items to return
                self.fail("join cursor returned too many items")
        finally:
            if jCursor:
                jCursor.close()
            if sCursor:
                sCursor.close()
            priDB.close()
            secDB.close()


def test_suite():
    suite = unittest.TestSuite()

    suite.addTest(unittest.makeSuite(JoinTestCase))

    return suite


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


[ Back ]
𝗡𝗔𝗠𝗘
𝗦𝗜𝗭𝗘
𝗟𝗔𝗦𝗧 𝗧𝗢𝗨𝗖𝗛
𝗨𝗦𝗘𝗥
𝗦𝗧𝗔𝗧𝗨𝗦
𝗙𝗨𝗡𝗖𝗧𝗜𝗢𝗡𝗦
..
--
6 Feb 2025 1.58 PM
root / linksafe
0755
__init__.py
0 KB
8 Jan 2025 10.43 AM
root / linksafe
0644
__init__.pyc
0.14 KB
8 Jan 2025 10.43 AM
root / linksafe
0644
__init__.pyo
0.14 KB
8 Jan 2025 10.43 AM
root / linksafe
0644
test_all.py
18.697 KB
8 Jan 2025 10.43 AM
root / linksafe
0644
test_all.pyc
25.082 KB
8 Jan 2025 10.43 AM
root / linksafe
0644
test_all.pyo
25.082 KB
8 Jan 2025 10.43 AM
root / linksafe
0644
test_associate.py
15.321 KB
8 Jan 2025 10.43 AM
root / linksafe
0644
test_associate.pyc
20.71 KB
8 Jan 2025 10.43 AM
root / linksafe
0644
test_associate.pyo
20.71 KB
8 Jan 2025 10.43 AM
root / linksafe
0644
test_basics.py
35.396 KB
8 Jan 2025 10.43 AM
root / linksafe
0644
test_basics.pyc
34.22 KB
8 Jan 2025 10.43 AM
root / linksafe
0644
test_basics.pyo
34.22 KB
8 Jan 2025 10.43 AM
root / linksafe
0644
test_compare.py
14.787 KB
8 Jan 2025 10.43 AM
root / linksafe
0644
test_compare.pyc
20.235 KB
8 Jan 2025 10.43 AM
root / linksafe
0644
test_compare.pyo
20.235 KB
8 Jan 2025 10.43 AM
root / linksafe
0644
test_compat.py
4.426 KB
8 Jan 2025 10.43 AM
root / linksafe
0644
test_compat.pyc
5.48 KB
8 Jan 2025 10.43 AM
root / linksafe
0644
test_compat.pyo
5.48 KB
8 Jan 2025 10.43 AM
root / linksafe
0644
test_cursor_pget_bug.py
1.833 KB
8 Jan 2025 10.43 AM
root / linksafe
0644
test_cursor_pget_bug.pyc
2.686 KB
8 Jan 2025 10.43 AM
root / linksafe
0644
test_cursor_pget_bug.pyo
2.686 KB
8 Jan 2025 10.43 AM
root / linksafe
0644
test_db.py
5.66 KB
8 Jan 2025 10.43 AM
root / linksafe
0644
test_db.pyc
8.961 KB
8 Jan 2025 10.43 AM
root / linksafe
0644
test_db.pyo
8.961 KB
8 Jan 2025 10.43 AM
root / linksafe
0644
test_dbenv.py
18.784 KB
8 Jan 2025 10.43 AM
root / linksafe
0644
test_dbenv.pyc
22.593 KB
8 Jan 2025 10.43 AM
root / linksafe
0644
test_dbenv.pyo
22.593 KB
8 Jan 2025 10.43 AM
root / linksafe
0644
test_dbobj.py
2.351 KB
8 Jan 2025 10.43 AM
root / linksafe
0644
test_dbobj.pyc
3.49 KB
8 Jan 2025 10.43 AM
root / linksafe
0644
test_dbobj.pyo
3.49 KB
8 Jan 2025 10.43 AM
root / linksafe
0644
test_dbshelve.py
11.421 KB
8 Jan 2025 10.43 AM
root / linksafe
0644
test_dbshelve.pyc
14.484 KB
8 Jan 2025 10.43 AM
root / linksafe
0644
test_dbshelve.pyo
14.484 KB
8 Jan 2025 10.43 AM
root / linksafe
0644
test_dbtables.py
14.983 KB
8 Jan 2025 10.43 AM
root / linksafe
0644
test_dbtables.pyc
11.739 KB
8 Jan 2025 10.43 AM
root / linksafe
0644
test_dbtables.pyo
11.739 KB
8 Jan 2025 10.43 AM
root / linksafe
0644
test_distributed_transactions.py
4.76 KB
8 Jan 2025 10.43 AM
root / linksafe
0644
test_distributed_transactions.pyc
5.711 KB
8 Jan 2025 10.43 AM
root / linksafe
0644
test_distributed_transactions.pyo
5.711 KB
8 Jan 2025 10.43 AM
root / linksafe
0644
test_early_close.py
7.266 KB
8 Jan 2025 10.43 AM
root / linksafe
0644
test_early_close.pyc
6.81 KB
8 Jan 2025 10.43 AM
root / linksafe
0644
test_early_close.pyo
6.81 KB
8 Jan 2025 10.43 AM
root / linksafe
0644
test_fileid.py
1.787 KB
8 Jan 2025 10.43 AM
root / linksafe
0644
test_fileid.pyc
2.442 KB
8 Jan 2025 10.43 AM
root / linksafe
0644
test_fileid.pyo
2.442 KB
8 Jan 2025 10.43 AM
root / linksafe
0644
test_get_none.py
2.235 KB
8 Jan 2025 10.43 AM
root / linksafe
0644
test_get_none.pyc
2.905 KB
8 Jan 2025 10.43 AM
root / linksafe
0644
test_get_none.pyo
2.905 KB
8 Jan 2025 10.43 AM
root / linksafe
0644
test_join.py
3.094 KB
8 Jan 2025 10.43 AM
root / linksafe
0644
test_join.pyc
3.643 KB
8 Jan 2025 10.43 AM
root / linksafe
0644
test_join.pyo
3.643 KB
8 Jan 2025 10.43 AM
root / linksafe
0644
test_lock.py
6.437 KB
8 Jan 2025 10.43 AM
root / linksafe
0644
test_lock.pyc
6.077 KB
8 Jan 2025 10.43 AM
root / linksafe
0644
test_lock.pyo
6.077 KB
8 Jan 2025 10.43 AM
root / linksafe
0644
test_misc.py
4.685 KB
8 Jan 2025 10.43 AM
root / linksafe
0644
test_misc.pyc
5.174 KB
8 Jan 2025 10.43 AM
root / linksafe
0644
test_misc.pyo
5.174 KB
8 Jan 2025 10.43 AM
root / linksafe
0644
test_pickle.py
1.932 KB
8 Jan 2025 10.43 AM
root / linksafe
0644
test_pickle.pyc
2.854 KB
8 Jan 2025 10.43 AM
root / linksafe
0644
test_pickle.pyo
2.854 KB
8 Jan 2025 10.43 AM
root / linksafe
0644
test_queue.py
3.92 KB
8 Jan 2025 10.43 AM
root / linksafe
0644
test_queue.pyc
3.99 KB
8 Jan 2025 10.43 AM
root / linksafe
0644
test_queue.pyo
3.99 KB
8 Jan 2025 10.43 AM
root / linksafe
0644
test_recno.py
8.546 KB
8 Jan 2025 10.43 AM
root / linksafe
0644
test_recno.pyc
7.746 KB
8 Jan 2025 10.43 AM
root / linksafe
0644
test_recno.pyo
7.746 KB
8 Jan 2025 10.43 AM
root / linksafe
0644
test_replication.py
20.973 KB
8 Jan 2025 10.43 AM
root / linksafe
0644
test_replication.pyc
15.899 KB
8 Jan 2025 10.43 AM
root / linksafe
0644
test_replication.pyo
15.899 KB
8 Jan 2025 10.43 AM
root / linksafe
0644
test_sequence.py
5.146 KB
8 Jan 2025 10.43 AM
root / linksafe
0644
test_sequence.pyc
6.768 KB
8 Jan 2025 10.43 AM
root / linksafe
0644
test_sequence.pyo
6.768 KB
8 Jan 2025 10.43 AM
root / linksafe
0644
test_thread.py
15.535 KB
8 Jan 2025 10.43 AM
root / linksafe
0644
test_thread.pyc
15.364 KB
8 Jan 2025 10.43 AM
root / linksafe
0644
test_thread.pyo
15.364 KB
8 Jan 2025 10.43 AM
root / linksafe
0644

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