summaryrefslogtreecommitdiffhomepage
path: root/test/unit/option.py
diff options
context:
space:
mode:
authorAndrei Zeliankou <zelenkov@nginx.com>2020-12-06 16:01:59 +0000
committerAndrei Zeliankou <zelenkov@nginx.com>2020-12-06 16:01:59 +0000
commit07789a23e9c513dba87b020fae2989a57955e8a6 (patch)
treeaa5b77497ee957b79a67f70df796c0da49447a22 /test/unit/option.py
parent55296e6ff2613a0b2ec588beaf01620b2679c3d1 (diff)
downloadunit-07789a23e9c513dba87b020fae2989a57955e8a6.tar.gz
unit-07789a23e9c513dba87b020fae2989a57955e8a6.tar.bz2
Tests: options moved to the separate class.
This change is necessary to separate the logic and prevent possible circular dependency.
Diffstat (limited to '')
-rw-r--r--test/unit/option.py16
1 files changed, 16 insertions, 0 deletions
diff --git a/test/unit/option.py b/test/unit/option.py
new file mode 100644
index 00000000..677d806e
--- /dev/null
+++ b/test/unit/option.py
@@ -0,0 +1,16 @@
+class Options():
+ _options = {
+ 'skip_alerts': [],
+ 'skip_sanitizer': False,
+ }
+
+ def __setattr__(self, name, value):
+ Options._options[name] = value
+
+ def __getattr__(self, name):
+ if name in Options._options:
+ return Options._options[name]
+
+ raise AttributeError
+
+option = Options()