# Path: bitcoinlib/main.py
# def script_type_default(witness_type=None, multisig=False, locking_script=False):
# def get_encoding_from_witness(witness_type=None):
# def deprecated(func):
#     def new_func(*args, **kwargs):
# 
# Path: bitcoinlib/db.py
# def compile_largebinary_mysql(type_, compiler, **kwargs):
#     def __init__(self, db_uri=None, password=None):
#     def drop_db(self, yes_i_am_sure=False):
#     def _import_config_data(ses):
# def add_column(engine, table_name, column):
#     def __repr__(self):
#     def __repr__(self):
#     def __repr__(self):
#     def __repr__(self):
# def db_update_version_id(db, version):
# def db_update(db, version_db, code_version=BITCOINLIB_VERSION):
# class Db:
# class DbConfig(Base):
# class DbWallet(Base):
# class DbKeyMultisigChildren(Base):
# class DbKey(Base):
# class DbNetwork(Base):
# class DbTransaction(Base):
# class DbTransactionInput(Base):
# class DbTransactionOutput(Base):
# 
# Path: bitcoinlib/encoding.py
# def normalize_string(string):
#     """
#     Normalize a string to the default NFKD unicode format
#     See https://en.wikipedia.org/wiki/Unicode_equivalence#Normalization
# 
#     :param string: string value
#     :type string: bytes, str
# 
#     :return: string
#     """
#     if isinstance(string, bytes):
#         utxt = string.decode('utf8')
#     elif isinstance(string, TYPE_TEXT):
#         utxt = string
#     else:
#         raise TypeError("String value expected")
# 
#     return unicodedata.normalize('NFKD', utxt)


import os
import sys
import unittest
    import mysql.connector
    import psycopg2
from subprocess import Popen, PIPE
    from parameterized import parameterized_class
    from psycopg2 import sql
    from psycopg2.extensions import ISOLATION_LEVEL_AUTOCOMMIT
from bitcoinlib.main import UNITTESTS_FULL_DATABASE_TEST
from bitcoinlib.db import BCL_DATABASE_DIR
from bitcoinlib.encoding import normalize_string
def init_sqlite(_):
    if os.path.isfile(SQLITE_DATABASE_FILE):
        os.remove(SQLITE_DATABASE_FILE)


def init_postgresql(_):
    con = psycopg2.connect(user='postgres', host='localhost', password='postgres')
    con.set_isolation_level(ISOLATION_LEVEL_AUTOCOMMIT)
    cur = con.cursor()
    cur.execute(sql.SQL("DROP DATABASE IF EXISTS {}").format(
        sql.Identifier(DATABASE_NAME))
    )
    cur.execute(sql.SQL("CREATE DATABASE {}").format(
        sql.Identifier(DATABASE_NAME))
    )
    cur.close()
    con.close()


def init_mysql(_):
    con = mysql.connector.connect(user='root', host='localhost')
    cur = con.cursor()
    cur.execute("DROP DATABASE IF EXISTS {}".format(DATABASE_NAME))
    cur.execute("CREATE DATABASE {}".format(DATABASE_NAME))
    con.commit()
    cur.close()
    con.close()


db_uris = (('sqlite:///' + SQLITE_DATABASE_FILE, init_sqlite),)

# Path: bitcoinlib/main.py
# def script_type_default(witness_type=None, multisig=False, locking_script=False):
# def get_encoding_from_witness(witness_type=None):
# def deprecated(func):
#     def new_func(*args, **kwargs):
# 
# Path: bitcoinlib/db.py
# def compile_largebinary_mysql(type_, compiler, **kwargs):
#     def __init__(self, db_uri=None, password=None):
#     def drop_db(self, yes_i_am_sure=False):
#     def _import_config_data(ses):
# def add_column(engine, table_name, column):
#     def __repr__(self):
#     def __repr__(self):
#     def __repr__(self):
#     def __repr__(self):
# def db_update_version_id(db, version):
# def db_update(db, version_db, code_version=BITCOINLIB_VERSION):
# class Db:
# class DbConfig(Base):
# class DbWallet(Base):
# class DbKeyMultisigChildren(Base):
# class DbKey(Base):
# class DbNetwork(Base):
# class DbTransaction(Base):
# class DbTransactionInput(Base):
# class DbTransactionOutput(Base):
# 
# Path: bitcoinlib/encoding.py
# def normalize_string(string):
#     """
#     Normalize a string to the default NFKD unicode format
#     See https://en.wikipedia.org/wiki/Unicode_equivalence#Normalization
# 
#     :param string: string value
#     :type string: bytes, str
# 
#     :return: string
#     """
#     if isinstance(string, bytes):
#         utxt = string.decode('utf8')
#     elif isinstance(string, TYPE_TEXT):
#         utxt = string
#     else:
#         raise TypeError("String value expected")
# 
#     return unicodedata.normalize('NFKD', utxt)


# Path: tests/test_tools.py
import os
import sys
import unittest
    import mysql.connector
    import psycopg2
from subprocess import Popen, PIPE
    from parameterized import parameterized_class
    from psycopg2 import sql
    from psycopg2.extensions import ISOLATION_LEVEL_AUTOCOMMIT
from bitcoinlib.main import UNITTESTS_FULL_DATABASE_TEST
from bitcoinlib.db import BCL_DATABASE_DIR
from bitcoinlib.encoding import normalize_string

def init_sqlite(_):
    if os.path.isfile(SQLITE_DATABASE_FILE):
        os.remove(SQLITE_DATABASE_FILE)


def init_postgresql(_):
    con = psycopg2.connect(user='postgres', host='localhost', password='postgres')
    con.set_isolation_level(ISOLATION_LEVEL_AUTOCOMMIT)
    cur = con.cursor()
    cur.execute(sql.SQL("DROP DATABASE IF EXISTS {}").format(
        sql.Identifier(DATABASE_NAME))
    )
    cur.execute(sql.SQL("CREATE DATABASE {}").format(
        sql.Identifier(DATABASE_NAME))
    )
    cur.close()
    con.close()


def init_mysql(_):
    con = mysql.connector.connect(user='root', host='localhost')
    cur = con.cursor()
    cur.execute("DROP DATABASE IF EXISTS {}".format(DATABASE_NAME))
    cur.execute("CREATE DATABASE {}".format(DATABASE_NAME))
    con.commit()
    cur.close()
    con.close()


db_uris = (('sqlite:///' + SQLITE_DATABASE_FILE, init_sqlite),)

if UNITTESTS_FULL_DATABASE_TEST: