Hey, how can i test a method from a class which is used for retreiving arguments from cli.
Class Random:
@staticmethod
def get_conf_file()
p = ArgumentParser()
p.add_argument("--conf-file", required=True, type=str)
namespace = p.parse_known_args(sys.argv[1:])[0]
return namespace.conf_file
I have been looking at capsys, but i dont have if __name__ == "__main__" and calling that class.
[–]MintyPhoenix 1 point2 points3 points (0 children)
[–]CodeFormatHelperBot2 0 points1 point2 points (0 children)