示例#1
0
   def test_print_people(self, mock_input, mock_ppp):
      from src.app import app

      app()

      self.assertEqual(mock_input.call_count, 2)
      mock_ppp.assert_called_once()
示例#2
0
from src.app import app


if __name__ == "__main__":
    app()
示例#3
0
文件: main.py 项目: ant-tod/code-test
'''
Main entry point for the program, used to centralise the spec file and the
settings for the loggers.

Usage python main.py file_fw file_ad
file_fw: file to save fixed width sample in.
file_ad: file to save ASCII delimited translation of above file in.
'''
from src.spec import spec
from src.app import app
import logging
import sys

logging.basicConfig(level=logging.WARNING)

if __name__ == '__main__':
    file_fw = sys.argv[1]
    file_ad = sys.argv[2]
    random = sys.argv[3]
    # TODO Fix the cl arguments using argparse.
    app(spec, file_fw, file_ad, random)
示例#4
0
def lambda_handler(event, context):
    logging.info("Starting")
    app(event['username'])
    logging.info('finish')
示例#5
0
from src.app import app


if __name__ == '__main__':
    print(app())
示例#6
0
 def test_main(self):
     self.assertEqual('Hello, World!', app())