summaryrefslogtreecommitdiff
path: root/yarnhelper_tests.py
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2017-03-04 20:14:33 +0200
committerLars Wirzenius <liw@liw.fi>2017-03-04 20:14:33 +0200
commit3b651fb14c1018d017b7fecd0be9a853094726d2 (patch)
tree6018b109bcf4f7662bf4061faaeae49e3c5339ee /yarnhelper_tests.py
parentf22175e01ed092acf408aff01af54005ea426268 (diff)
downloadgit.liw.fi-ruleset-tests-3b651fb14c1018d017b7fecd0be9a853094726d2.tar.gz
Make basic ian can clone scenario work
Diffstat (limited to 'yarnhelper_tests.py')
-rw-r--r--yarnhelper_tests.py11
1 files changed, 4 insertions, 7 deletions
diff --git a/yarnhelper_tests.py b/yarnhelper_tests.py
index 46a0604..cd1c9a3 100644
--- a/yarnhelper_tests.py
+++ b/yarnhelper_tests.py
@@ -66,13 +66,6 @@ class PersistentVariableTests(unittest.TestCase):
if os.path.exists(yarnhelper.variables_filename):
os.remove(yarnhelper.variables_filename)
- def test_raises_error_if_no_such_variable(self):
- h = yarnhelper.YarnHelper()
- with self.assertRaises(yarnhelper.Error):
- h.get_variable('FOO')
- print
- print 'variables:', h._variables
-
def test_sets_variable_persistently(self):
h = yarnhelper.YarnHelper()
h.set_variable('FOO', 'bar')
@@ -80,6 +73,10 @@ class PersistentVariableTests(unittest.TestCase):
h2 = yarnhelper.YarnHelper()
self.assertEqual(h2.get_variable('FOO'), 'bar')
+ def test_get_returns_default_if_variable_not_set(self):
+ h = yarnhelper.YarnHelper()
+ self.assertEqual(h.get_variable('FOO', 'bar'), 'bar')
+
def test_appends_to_empty_list(self):
h = yarnhelper.YarnHelper()
h.append_to_list('foo', 1)