You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
615 B
31 lines
615 B
import unittest |
|
import threading |
|
|
|
from lib import constants |
|
|
|
|
|
# some unit tests are modifying globals; sorry. |
|
class SequentialTestCase(unittest.TestCase): |
|
|
|
test_lock = threading.Lock() |
|
|
|
def setUp(self): |
|
super().setUp() |
|
self.test_lock.acquire() |
|
|
|
def tearDown(self): |
|
super().tearDown() |
|
self.test_lock.release() |
|
|
|
|
|
class TestCaseForTestnet(SequentialTestCase): |
|
|
|
@classmethod |
|
def setUpClass(cls): |
|
super().setUpClass() |
|
constants.set_testnet() |
|
|
|
@classmethod |
|
def tearDownClass(cls): |
|
super().tearDownClass() |
|
constants.set_mainnet()
|
|
|