summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorrsiddharth <s@ricketyspace.net>2016-11-13 01:20:43 +0000
committerrsiddharth <s@ricketyspace.net>2016-11-13 01:20:43 +0000
commite4dd3db7afd52ff7de7acd128195decedf465f23 (patch)
treeafabf19792ed041e5147f2c82f49f1699bed7538 /tests
parentba6981811e863e9929db87533a88b8ead52f9369 (diff)
Add `pkgs_dir` function.
* gd_diff.py (pkgs_dir): New function. * tests/test_gd_diff.py (test_pkgs_dir): Test for `pkgs_dir`.
Diffstat (limited to 'tests')
-rw-r--r--tests/test_gd_diff.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/test_gd_diff.py b/tests/test_gd_diff.py
index ff092a2..0130482 100644
--- a/tests/test_gd_diff.py
+++ b/tests/test_gd_diff.py
@@ -247,6 +247,17 @@ class TestGdDiff(object):
'gns-deb-diff', 'config'))
+ def test_pkgs_dir(self):
+ def env(e):
+ return self.test_home
+
+ with mock.patch('os.getenv', new=env):
+ pd = pkgs_dir()
+ assert_equal(pd, os.path.join(self.test_home, '.config',
+ 'gns-deb-diff', 'pkgs'))
+ assert_equal(os.path.isdir(pd), True)
+
+
def test_configured_p_no(self):
def env(e):
return self.test_home