1) Using pytest at least, any code that calls cobaya gets stopped at these lines in cobaya/log.py, in the function `logger_setup`
Code: Select all
if not any(h.stream == sys.stdout for h in logging.root.handlers): logging.root.addHandler(handle_stdout)
2) When I write a new theory or likelihood class, I can only write a unit test for functionalities that do not need things like `state` and `**params_values_dict`, which depends on other theory modules and how cobaya initializes the sampled parameters. So as a result I cannot test separately ingredients of `calculate` function. Is there anyway to generate a sample `state`, `params_values_dict` and `provider` within cobaya to do the unit test for a theory module? Or would there be pre-written test classes for Theory and Likelihood that users can inherit? Please let us know what's the best way of doing this! Thank you!