documentation on the tests

This commit is contained in:
gwen
2013-08-22 12:17:10 +02:00
parent 747d994762
commit 3d67e35447
5 changed files with 23 additions and 6 deletions

View File

@ -1,5 +1,8 @@
# -*- coding: utf-8 -*-
#this test is much more to test that **it's there** and answers attribute access
"""theses tests are much more to test that config, option description, vs...
**it's there** and answers via attribute access"""
import autopath
from py.test import raises
@ -31,6 +34,9 @@ def make_description():
def test_base_config():
"""making a :class:`tiramisu.config.Config()` object
and a :class:`tiramisu.option.OptionDescription()` object
"""
gcdummy = BoolOption('dummy', 'dummy', default=False)
descr = OptionDescription('tiramisu', '', [gcdummy])
cfg = Config(descr)
@ -79,7 +85,7 @@ def test_base_config_and_groups():
def test_base_config_in_a_tree():
"how options are organized into a tree"
"how options are organized into a tree, see :ref:`tree`"
descr = make_description()
config = Config(descr)
config.bool = False
@ -114,6 +120,7 @@ def test_base_config_in_a_tree():
def test_cfgimpl_get_home_by_path():
" :meth:`tiramisu.config.SubConfig.cfgimpl_get_home_by_path()` to retrieve a path"
descr = make_description()
config = Config(descr)
config.bool = False

View File

@ -1,9 +1,13 @@
"""these tests are here to create some :class:`tiramisu.option.Option`'s
and to compare them
"""
import autopath
from tiramisu.option import BoolOption, IntOption
def test_option_comparison():
"compare :class:`tiramisu.option.BoolOption`"
dummy1 = BoolOption('dummy1', 'doc dummy')
dummy2 = BoolOption('dummy2', 'doc dummy')
dummy3 = BoolOption('dummy1', 'doc dummy')
@ -12,6 +16,7 @@ def test_option_comparison():
def test_option_comparison_obj():
"compare :class:`tiramisu.option.IntOption`"
dummy1 = BoolOption('dummy1', 'doc dummy')
dummy2 = IntOption('dummy1', 'doc dummy')
assert dummy1 != dummy2