xref: /unit/test/unit/option.py (revision 1848:4bd548074e2c)
1*1848Szelenkov@nginx.comclass Options:
21730Szelenkov@nginx.com    _options = {
31730Szelenkov@nginx.com        'skip_alerts': [],
41730Szelenkov@nginx.com        'skip_sanitizer': False,
51730Szelenkov@nginx.com    }
61730Szelenkov@nginx.com
71730Szelenkov@nginx.com    def __setattr__(self, name, value):
81730Szelenkov@nginx.com        Options._options[name] = value
91730Szelenkov@nginx.com
101730Szelenkov@nginx.com    def __getattr__(self, name):
111730Szelenkov@nginx.com        if name in Options._options:
121730Szelenkov@nginx.com            return Options._options[name]
131730Szelenkov@nginx.com
141730Szelenkov@nginx.com        raise AttributeError
151730Szelenkov@nginx.com
16*1848Szelenkov@nginx.com
171730Szelenkov@nginx.comoption = Options()
18