"""Tests copy this script to a a temporary directory and then run it.""" from logging_configurator import configure_logging import logging import os.path if __name__ == "__main__": configure_logging(os.path.join(os.path.dirname(__file__), "log.txt"), log_level="INFO", append=False, stdout_and_stderr=True) logger = logging.getLogger("logging_configurator_test") logger.info(111) logger.info(222) logger.warning(333) logger.error(444) raise ValueError(666)
def setUp(self): configure_logging() self.config = Config('config-test.json')
def setUp(self): configure_logging()
def setUp(self): configure_logging() self.configFile = Config('tests/config-test.json', True, False)
import logging import pathlib import random from typing import List, Tuple import logging_configurator import pandas as pd import plac LOGGER = logging.getLogger("the-box") logging_configurator.configure_logging(log_level="DEBUG") BOX_ITEM_EXPIRATION = 4 HARDCORE_START = 15 class Player: name: str house_items: List[str] missing_house_items: List[str] box_items: List[Tuple[str, int]] def __init__(self, name: str, starting_items: List[str]): self.name = name self.house_items = starting_items.copy() self.missing_house_items = [] self.box_items = [] @property def is_missing_items(self) -> bool: return len(self.missing_house_items) > 0