Compare commits

...

1 Commits
main ... dev

Author SHA1 Message Date
b6742a4668 Initial Project Structure.
New: basic project structure.
New: main.py script.
New: basic unit tests and testing script.
2023-05-23 15:58:14 +08:00
6 changed files with 43 additions and 0 deletions

10
main.py Normal file
View File

@ -0,0 +1,10 @@
print("Main")
# TODO
# Create TDBD Simulation Object, passing parameters.
# Run TDBD Simulation and obtain observation result.
# Create other simulation objects with parameters.
# Run other simulation and obtain observation result.

0
tdbd/__init__.py Normal file
View File

8
test_haocrowd.py Normal file
View File

@ -0,0 +1,8 @@
import unittest
loader = unittest.TestLoader()
start_dir = "./haocrowd/tests/"
suite = loader.discover(start_dir)
runner = unittest.TextTestRunner(verbosity=2)
runner.run(suite)

8
test_tdbd.py Normal file
View File

@ -0,0 +1,8 @@
import unittest
loader = unittest.TestLoader()
start_dir = "./tests/"
suite = loader.discover(start_dir)
runner = unittest.TextTestRunner(verbosity=2)
runner.run(suite)

0
tests/__init__.py Normal file
View File

View File

@ -0,0 +1,17 @@
import unittest
from haocrowd.core.base import SimulationBase
class TestHaoCrowd(unittest.TestCase):
def test_haocrowd_base(self):
class TDBDSim(SimulationBase):
def run(self) -> int:
return 123
sim = TDBDSim()
self.assertEqual(sim.run(), 123)
if __name__ == "__main__":
unittest.main()