~mvo/click/click-check-libs

« back to all changes in this revision

Viewing changes to click/tests/test_paths.py.in

  • Committer: Colin Watson
  • Date: 2014-07-09 12:56:21 UTC
  • mto: This revision was merged to the branch mainline in revision 488.
  • Revision ID: cjwatson@canonical.com-20140709125621-lwhcwjr0gyhfy6id
Add many more unit tests to fill in some gaps in the coverage report.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# Copyright (C) 2013 Canonical Ltd.
 
2
# Author: Colin Watson <cjwatson@ubuntu.com>
 
3
 
 
4
# This program is free software: you can redistribute it and/or modify
 
5
# it under the terms of the GNU General Public License as published by
 
6
# the Free Software Foundation; version 3 of the License.
 
7
#
 
8
# This program is distributed in the hope that it will be useful,
 
9
# but WITHOUT ANY WARRANTY; without even the implied warranty of
 
10
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
11
# GNU General Public License for more details.
 
12
#
 
13
# You should have received a copy of the GNU General Public License
 
14
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
15
 
 
16
"""Unit tests for click.paths.
 
17
 
 
18
This is mostly just to reduce noise in the coverage report.
 
19
"""
 
20
 
 
21
from __future__ import print_function
 
22
 
 
23
__metaclass__ = type
 
24
__all__ = [
 
25
    'TestClickPaths',
 
26
    ]
 
27
 
 
28
 
 
29
from gi.repository import Click
 
30
 
 
31
from click.tests.helpers import TestCase
 
32
 
 
33
 
 
34
class TestClickPaths(TestCase):
 
35
    def test_get_hooks_dir(self):
 
36
        self.assertEqual("@pkgdatadir@/hooks", Click.get_hooks_dir())
 
37
 
 
38
    def test_get_db_dir(self):
 
39
        self.assertEqual("@sysconfdir@/click/databases", Click.get_db_dir())
 
40
 
 
41
    def test_get_frameworks_dir(self):
 
42
        self.assertEqual("@pkgdatadir@/frameworks", Click.get_frameworks_dir())