单元测试#

测试使用Python的unittest模块编写。以下是运行测试的一些方法:

  • 运行所有价格测试

    python -m unittest tests.test_prices
    
  • 运行部分价格测试

    python -m unittest tests.test_prices.TestPriceRepair
    
  • 运行特定测试

    python -m unittest tests.test_prices_repair.TestPriceRepair.test_ticker_missing
    
  • 通用命令:

    ..code-block:: bash

    python -m unittest tests.{file}.{class}.{method}

  • 运行所有测试

    python -m unittest discover -s tests
    

注意

测试目前已经失败

标准结果:

失败次数: 11

错误: 93

跳过: 1

另请参阅

See the ` unittest module <https://docs.python.org/3/library/unittest.html>`_ for more information.