Check-in [c9a0dac16e]
Not logged in

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Added simple ReST document test.
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:c9a0dac16e64ce89a34a57b6a86883a8f41ddff8
User & Date: yusuke 2010-10-26 11:35:17
Context
2010-10-26
11:36
need docutils for testing purpose. check-in: 2adc03f838 user: yusuke tags: trunk
11:35
Added simple ReST document test. check-in: c9a0dac16e user: yusuke tags: trunk
2010-10-25
21:40
Updated the document for pypi recognizing of ReST. check-in: 2df0b23b38 user: yusuke tags: trunk, 0.1
Changes

Changes to tests/conftest.py.

20
21
22
23
24
25
26
27

28
29
30
31
32
33
34
..
50
51
52
53
54
55
56


57
58
59
60
61
62
63
64
65
66
67
68
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
"""

from os import path, environ
import sys
sys.path.insert(0, path.join(*path.split(path.abspath(path.dirname(__file__)))[:-1]))


import py

def mimic_defer(obj, *args, **kwargs):
    obj(*args, **kwargs)

def pytest_addoption(parser):
................................................................................
    except ImportError:
        py.skip("Ensure the path of google appengine for testing")

def pytest_funcarg__context(request):
    return Context(request)

class Context(object):


    def __init__(self, request):
        self.config = request.config

    def defer(self, d, *args, **kwargs):
        mimic_defer(d, *args, **kwargs)

    def deferred(self):
        from gaedeferred import (Deferred, PermanentTaskFailure)
        return Deferred(_raise_exception_types=(
            PermanentTaskFailure,
            TypeError,
            AssertionError))







|
>







 







>
>












20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
..
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
"""

from os import path, environ
import sys
project_root_path = path.join(*path.split(path.abspath(path.dirname(__file__)))[:-1])
sys.path.insert(0, project_root_path)

import py

def mimic_defer(obj, *args, **kwargs):
    obj(*args, **kwargs)

def pytest_addoption(parser):
................................................................................
    except ImportError:
        py.skip("Ensure the path of google appengine for testing")

def pytest_funcarg__context(request):
    return Context(request)

class Context(object):
    project_root_path = project_root_path

    def __init__(self, request):
        self.config = request.config

    def defer(self, d, *args, **kwargs):
        mimic_defer(d, *args, **kwargs)

    def deferred(self):
        from gaedeferred import (Deferred, PermanentTaskFailure)
        return Deferred(_raise_exception_types=(
            PermanentTaskFailure,
            TypeError,
            AssertionError))

Added tests/test_doc.py.





















>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
import os

target_doc_list = [
    'README.txt',
]

def test_doc(context):
    for target_doc in target_doc_list:
        target_path = os.path.join(context.project_root_path, target_doc)
        assert os.system("rst2xml.py --strict %s" % target_path) == 0