blob: eaf9b9f556db1db6232f36d4d313008eacff76c2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
# -*- coding: utf-8 -*-
"""
test_overlay.py
~~~~~~~~~~~~~~~
test suite for the *g_octave.overlay* module
:copyright: (c) 2010 by Rafael Goncalves Martins
:license: GPL-2, see LICENSE for more details.
"""
import os
import unittest
import testcase
from g_octave import config, overlay
class TestOverlay(testcase.TestCase):
def test_overlay(self):
overlay.create_overlay(quiet=True)
files = {
os.path.join(self._config.overlay, 'profiles', 'repo_name'): 'g-octave',
os.path.join(self._config.overlay, 'profiles', 'categories'): 'g-octave',
}
for _file in files:
self.assertTrue(os.path.exists(_file))
with open(_file) as fp:
self.assertEqual(fp.read(), files[_file])
self.assertTrue(os.path.islink(
os.path.join(self._config.overlay, 'eclass', 'g-octave.eclass')
))
def suite():
suite = unittest.TestSuite()
suite.addTest(TestOverlay('test_overlay'))
return suite
|