aboutsummaryrefslogtreecommitdiffstats
path: root/_pytest
diff options
context:
space:
mode:
authorSamuel Holland <samuel@sholland.org>2018-05-10 15:50:17 -0500
committerTrygve Aaberge <trygveaa@gmail.com>2019-04-08 15:11:57 +0200
commitdc3c25d13f9bb150bd22e367f8416113cb57f295 (patch)
treebdb5091b2d0c6feaff45cd631d600057c2bd2f3a /_pytest
parent035a28ed1cccbd5c1af18f3260e368ba878b83f4 (diff)
downloadwee-slack-dc3c25d13f9bb150bd22e367f8416113cb57f295.tar.gz
Remember plugin config values in FakeWeechat
PluginConfig uses round-tripping through wee_slack.w to coerce the its default values to the correct type. Without this, the normal getters fail, as '' cannot be converted to an integer/boolean.
Diffstat (limited to '_pytest')
-rw-r--r--_pytest/conftest.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/_pytest/conftest.py b/_pytest/conftest.py
index 951797a..8b24559 100644
--- a/_pytest/conftest.py
+++ b/_pytest/conftest.py
@@ -56,9 +56,8 @@ class FakeWeechat():
WEECHAT_RC_ERROR = 0
WEECHAT_RC_OK = 1
WEECHAT_RC_OK_EAT = 2
-
def __init__(self):
- pass
+ self.config = {}
#print("INITIALIZE FAKE WEECHAT")
def prnt(*args):
output = "("
@@ -79,9 +78,11 @@ class FakeWeechat():
def prefix(self, type):
return ""
def config_get_plugin(self, key):
- return ""
+ return self.config.get(key, "")
def config_get(self, key):
return ""
+ def config_set_plugin(self, key, value):
+ self.config[key] = value
def config_string(self, key):
return ""
def color(self, name):