def transaction__set_type_(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.set_type_ \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__set_type_ in run: %s', environment_directory + identifier + ".xml") # Construct household filename environment = Environment(environment_directory, identifier) # # TESTING # print("Creating a transaction") transaction = Transaction() transaction.type_ = "test_type" print("Type: ") print(transaction.get_type_()) print("Setting type") transaction.set_type_("new_type") print("Type: ") print(transaction.get_type_())