documentation on the tests
This commit is contained in:
parent
747d994762
commit
3d67e35447
@ -94,6 +94,11 @@ And if you wanna come back to a default value, use the builtin `del()` function:
|
||||
|
||||
.. module:: tiramisu.config
|
||||
|
||||
.. _`tree`:
|
||||
|
||||
The handling of options
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
The handling of options is split into two parts: the description of
|
||||
which options are available, what their possible values and defaults are
|
||||
and how they are organized into a tree. A specific choice of options is
|
||||
|
@ -11,8 +11,8 @@ Three builtins exceptions are used :
|
||||
|
||||
- **AttributeError** : wrong path or unknownd option or optiondescription
|
||||
|
||||
And five user-defined exceptions :
|
||||
-----------------------------------
|
||||
And five other exceptions :
|
||||
------------------------------
|
||||
|
||||
.. automodule:: tiramisu.error
|
||||
:members:
|
||||
|
@ -35,7 +35,8 @@ configuration handler.
|
||||
consistency
|
||||
error
|
||||
glossary
|
||||
|
||||
test
|
||||
|
||||
Indices and tables
|
||||
==================
|
||||
|
||||
@ -52,4 +53,3 @@ This work is licensed under a `Creative Commons Attribution-ShareAlike 3.0 Unpor
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user