當前位置: 首頁>>代碼示例>>Python>>正文


Python Transaction.get_time_of_default方法代碼示例

本文整理匯總了Python中src.transaction.Transaction.get_time_of_default方法的典型用法代碼示例。如果您正苦於以下問題:Python Transaction.get_time_of_default方法的具體用法?Python Transaction.get_time_of_default怎麽用?Python Transaction.get_time_of_default使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在src.transaction.Transaction的用法示例。


在下文中一共展示了Transaction.get_time_of_default方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: transaction__get_time_of_default

# 需要導入模塊: from src.transaction import Transaction [as 別名]
# 或者: from src.transaction.Transaction import get_time_of_default [as 別名]
    def transaction__get_time_of_default(self, args):
        import os
        from src.bank import Bank
        from src.household import Household
        from src.firm import Firm
        from src.environment import Environment
        from src.transaction import Transaction

        text = "This test checks transaction.get_time_of_default \n"
        self.print_info(text)
        #
        # INITIALIZATION
        #
        environment_directory = str(args[0])
        identifier = str(args[1])
        log_directory = str(args[2])

        # Configure logging parameters so we get output while the program runs
        logging.basicConfig(format='%(asctime)s %(message)s', datefmt='%m/%d/%Y %H:%M:%S',
                            filename=log_directory + identifier + ".log", level=logging.INFO)
        logging.info('START logging for test transaction__get_time_of_default in run: %s',
                     environment_directory + identifier + ".xml")

        # Construct household filename
        environment = Environment(environment_directory,  identifier)

        #
        # TESTING
        #

        print("Creating a transaction")
        transaction = Transaction()
        transaction.time_of_default = 1
        print("Time of default: ")
        print(transaction.get_time_of_default())
開發者ID:cogeorg,項目名稱:black_rhino,代碼行數:37,代碼來源:tests_transaction.py


注:本文中的src.transaction.Transaction.get_time_of_default方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。