From 11f5db1b7764c2d9cabf8613a3e991ec9b3f20aa Mon Sep 17 00:00:00 2001 From: nanoric Date: Wed, 27 Mar 2019 04:17:33 -0400 Subject: [PATCH] [Add] added a test to check if all module can be import without error. --- tests/load_all.py | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 tests/load_all.py diff --git a/tests/load_all.py b/tests/load_all.py new file mode 100644 index 00000000..feae9c12 --- /dev/null +++ b/tests/load_all.py @@ -0,0 +1,26 @@ +# flake8: noqa +import unittest + + +class ImportTest(unittest.TestCase): + + # noinspection PyUnresolvedReferences + def test_import_all(self): + from vnpy.event import EventEngine + + from vnpy.trader.engine import MainEngine + from vnpy.trader.ui import MainWindow, create_qapp + + from vnpy.gateway.bitmex import BitmexGateway + from vnpy.gateway.futu import FutuGateway + from vnpy.gateway.ib import IbGateway + from vnpy.gateway.ctp import CtpGateway + from vnpy.gateway.tiger import TigerGateway + from vnpy.gateway.oes import OesGateway + + from vnpy.app.cta_strategy import CtaStrategyApp + from vnpy.app.csv_loader import CsvLoaderApp + + +if __name__ == '__main__': + unittest.main()