undo sqlthread
This commit is contained in:
parent
61fac9e8d7
commit
ae075d9c16
|
@ -1,44 +1,44 @@
|
||||||
# """Tests for SQL thread"""
|
"""Tests for SQL thread"""
|
||||||
# # flake8: noqa:E402
|
# flake8: noqa:E402
|
||||||
# import os
|
import os
|
||||||
# import tempfile
|
import tempfile
|
||||||
# import threading
|
import threading
|
||||||
# import unittest
|
import unittest
|
||||||
#
|
|
||||||
# from .common import skip_python3
|
from .common import skip_python3
|
||||||
#
|
|
||||||
# skip_python3()
|
skip_python3()
|
||||||
#
|
|
||||||
# os.environ['BITMESSAGE_HOME'] = tempfile.gettempdir()
|
os.environ['BITMESSAGE_HOME'] = tempfile.gettempdir()
|
||||||
#
|
|
||||||
# from pybitmessage.helper_sql import (
|
from pybitmessage.helper_sql import (
|
||||||
# sqlQuery, sql_ready, sqlStoredProcedure) # noqa:E402
|
sqlQuery, sql_ready, sqlStoredProcedure) # noqa:E402
|
||||||
# from pybitmessage.class_sqlThread import sqlThread # noqa:E402
|
from pybitmessage.class_sqlThread import sqlThread # noqa:E402
|
||||||
# from pybitmessage.addresses import encodeAddress # noqa:E402
|
from pybitmessage.addresses import encodeAddress # noqa:E402
|
||||||
#
|
|
||||||
#
|
|
||||||
# class TestSqlThread(unittest.TestCase):
|
class TestSqlThread(unittest.TestCase):
|
||||||
# """Test case for SQL thread"""
|
"""Test case for SQL thread"""
|
||||||
#
|
|
||||||
# @classmethod
|
@classmethod
|
||||||
# def setUpClass(cls):
|
def setUpClass(cls):
|
||||||
# # Start SQL thread
|
# Start SQL thread
|
||||||
# sqlLookup = sqlThread()
|
sqlLookup = sqlThread()
|
||||||
# sqlLookup.daemon = True
|
sqlLookup.daemon = True
|
||||||
# sqlLookup.start()
|
sqlLookup.start()
|
||||||
# sql_ready.wait()
|
sql_ready.wait()
|
||||||
#
|
|
||||||
# @classmethod
|
@classmethod
|
||||||
# def tearDownClass(cls):
|
def tearDownClass(cls):
|
||||||
# sqlStoredProcedure('exit')
|
sqlStoredProcedure('exit')
|
||||||
# for thread in threading.enumerate():
|
for thread in threading.enumerate():
|
||||||
# if thread.name == "SQL":
|
if thread.name == "SQL":
|
||||||
# thread.join()
|
thread.join()
|
||||||
#
|
|
||||||
# def test_create_function(self):
|
def test_create_function(self):
|
||||||
# """Check the result of enaddr function"""
|
"""Check the result of enaddr function"""
|
||||||
# encoded_str = encodeAddress(4, 1, "21122112211221122112")
|
encoded_str = encodeAddress(4, 1, "21122112211221122112")
|
||||||
#
|
|
||||||
# query = sqlQuery('SELECT enaddr(4, 1, "21122112211221122112")')
|
query = sqlQuery('SELECT enaddr(4, 1, "21122112211221122112")')
|
||||||
# self.assertEqual(
|
self.assertEqual(
|
||||||
# query[0][-1], encoded_str, "test case fail for create_function")
|
query[0][-1], encoded_str, "test case fail for create_function")
|
||||||
|
|
Reference in New Issue
Block a user