summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorrsiddharth <s@ricketyspace.net>2016-11-13 01:56:37 +0000
committerrsiddharth <s@ricketyspace.net>2016-11-13 01:56:37 +0000
commit3249ad81a1fa90b868c7ad44a3af72f08033dd6a (patch)
tree2b3617bd6422986cff48e7b004084764ae12b002 /tests
parentbfa7558c986fc70e21c708d9e4fc247dc481103a (diff)
Add `readmes_dir` function.
* gd_diff.py (readmes_dir): New function. * tests/test_gd_diff.py (test_readmes_dir): Test for `readmes_dir` function.
Diffstat (limited to 'tests')
-rw-r--r--tests/test_gd_diff.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/test_gd_diff.py b/tests/test_gd_diff.py
index 0130482..78e10ef 100644
--- a/tests/test_gd_diff.py
+++ b/tests/test_gd_diff.py
@@ -258,6 +258,18 @@ class TestGdDiff(object):
assert_equal(os.path.isdir(pd), True)
+ def test_readmes_dir(self):
+ def env(e):
+ return self.test_home
+
+ with mock.patch('os.getenv', new=env):
+ rd_parkes = readmes_dir('parkes')
+ assert_equal(rd_parkes, os.path.join(self.test_home, '.config',
+ 'gns-deb-diff', 'readmes',
+ 'parkes'))
+ assert_equal(os.path.isdir(rd_parkes), True)
+
+
def test_configured_p_no(self):
def env(e):
return self.test_home