first commit

This commit is contained in:
2025-10-11 11:23:58 +08:00
commit e8774085f8
48 changed files with 3087 additions and 0 deletions

21
python/ojunit.py Executable file
View File

@@ -0,0 +1,21 @@
import unittest, logging, os, sys
from engineconfig import getConfig
class OJTestCase(unittest.TestCase):
def setUp(self):
logger = logging.getLogger('main')
hdlr = logging.StreamHandler()
formatter = logging.Formatter('%(asctime)s %(levelname)s %(message)s')
hdlr.setFormatter(formatter)
logger.addHandler(hdlr)
logger.setLevel(logging.DEBUG)
execfile(os.path.join('..', 'testdata', 'test_config.py'))
self.config = getConfig()
self.ds = self.config.datasources[0]
self.dbname = os.path.join('..', 'testdata', self.config.testdb)
self.logger = logger