예제 #1
0
def test_no_yamlfm():
    with cd('no_yamlfm'):
        with pytest.warns(UrubuWarning) as record:
            project.build()
        print (record)
        assert len(record) == 1
        assert _warning.no_yamlfm in str(record[0].message)
예제 #2
0
def test_no_yamlfm():
    with cd('no_yamlfm'):
        with pytest.warns(UrubuWarning) as record:
            project.build()
        print(record)
        assert len(record) == 1
        assert _warning.no_yamlfm in str(record[0].message)
예제 #3
0
def test_doc():
    with cd('../../doc'):
        project.build()
        touch('_build/.nojekyll')
        d = git('--no-pager', 'diff', '-w', '--', '_build')
        if d:
            print(d)
            raise ValueError('Diffs in website')
예제 #4
0
파일: test_doc.py 프로젝트: ayenzky/urubu
def test_doc():
    with cd('../../doc'):
        project.build()
        touch('_build/.nojekyll')
        d = git('--no-pager', 'diff', '-w', '--', '_build')
        if d:
            print(d)
            raise ValueError('Diffs in website')
예제 #5
0
def main():
    parser = argparse.ArgumentParser(prog='python -m urubu')
    parser.add_argument('--version', action='version', version=__version__)
    parser.add_argument('command', choices=['build', 'serve'])
    args = parser.parse_args()
    if args.command == 'build':
        project.build()
    elif args.command == 'serve':
        serve() 
예제 #6
0
파일: main.py 프로젝트: smurfix/urubu
def main():
    parser = argparse.ArgumentParser(prog='python -m urubu')
    parser.add_argument('--version', action='version', version=__version__)
    parser.add_argument('command', choices=['build', 'serve'])
    args = parser.parse_args()
    if args.command == 'build':
        project.build()
    elif args.command == 'serve':
        serve()
예제 #7
0
def test_doc():
    with cd('../../doc'):
        sys.path.insert(0, os.getcwd())
        project.build()
        touch('_build/.nojekyll')
        d = git('--no-pager', 'diff', '-w', '--', '_build')
        if d:
            print(d)
            raise ValueError('Diffs in website')
    _python = None
예제 #8
0
def main():
    parser = argparse.ArgumentParser(prog='python -m urubu')
    parser.add_argument('--version', action='version', version=__version__)
    parser.add_argument('command', choices=['build', 'serve', 'serveany'])
    args = parser.parse_args()
    if args.command == 'build':
        project.build()
    elif args.command == 'serve':
        proj = project.load()
        serve(proj.site['baseurl'])
    elif args.command == 'serveany':
        proj = project.load()
        serve(proj.site['baseurl'], host='')
예제 #9
0
파일: main.py 프로젝트: ayenzky/urubu
def main():
    parser = argparse.ArgumentParser(prog='python -m urubu')
    parser.add_argument('--version', action='version', version=__version__)
    parser.add_argument('command', choices=['build', 'serve', 'serveany'])
    args = parser.parse_args()
    if args.command == 'build':
        project.build()
    elif args.command == 'serve':
        proj = project.load()
        serve(proj.site['baseurl'])
    elif args.command == 'serveany':
        proj = project.load()
        serve(proj.site['baseurl'], host='')
예제 #10
0
def test_ambig_ref():
    with cd('ambig_ref'):
        with raises_kind(UrubuError, _error.ambig_ref):
            project.build()
예제 #11
0
def test_undef_tag_layout():
    with cd('undef_tag_layout'):
        with pytest.warns(UrubuWarning) as record:
            project.build()
        assert len(record) == 1
        assert _warning.undef_tag_layout in str(record[0].message)
예제 #12
0
파일: test_errors.py 프로젝트: ra2003/urubu
def test_undef_ref():
    with cd('undef_ref'):
        with raises_kind(UrubuError, _error.undef_ref):
            project.build()
예제 #13
0
파일: test_errors.py 프로젝트: ra2003/urubu
def test_undef_reflink_title():
    with cd('undef_reflink_title'):
        with raises_kind(UrubuError, _error.undef_reflink_key):
            project.build()
예제 #14
0
파일: test_errors.py 프로젝트: ra2003/urubu
def test_undef_content():
    with cd('undef_content'):
        with raises_kind(UrubuError, _error.undef_content):
            project.build()
예제 #15
0
파일: test_errors.py 프로젝트: ra2003/urubu
def test_date_format():
    with cd('date_format'):
        with raises_kind(UrubuError, _error.date_format):
            project.build()
예제 #16
0
def test_undef_anchor():
    with cd('undef_anchor'):
        with pytest.warns(UrubuWarning) as record:
            project.build()
        assert len(record) == 1
        assert _warning.undef_anchor in str(record[0].message)
예제 #17
0
def test_no_index():
    with cd('no_index'):
        with raises_kind(UrubuError, _error.no_index):
            project.build()
예제 #18
0
def test_undef_tag_layout():
    with cd('undef_tag_layout'):
        with pytest.warns(UrubuWarning) as record:
            project.build()
        assert len(record) == 1
        assert _warning.undef_tag_layout in str(record[0].message)
예제 #19
0
def test_date_format():
    with cd('date_format'):
        with raises_kind(UrubuError, _error.date_format):
            project.build()
예제 #20
0
파일: test_errors.py 프로젝트: ra2003/urubu
def test_ambig_ref():
    with cd('ambig_ref'):
        with raises_kind(UrubuError, _error.ambig_ref):
            project.build()
예제 #21
0
def test_ignore_patterns():
    with cd('ignore_patterns'):
        project.build()
        assert not os.path.exists(os.path.join('_build', 'README.html'))
        assert os.path.exists(os.path.join('_build', 'page.html'))
예제 #22
0
파일: test_errors.py 프로젝트: ra2003/urubu
def test_ignore_patterns():
    with cd('ignore_patterns'):
        project.build()
        assert not os.path.exists(os.path.join('_build', 'README.html'))
        assert os.path.exists(os.path.join('_build', 'page.html'))
예제 #23
0
def test_undef_content():
    with cd('undef_content'):
        with raises_kind(UrubuError, _error.undef_content):
            project.build()
예제 #24
0
파일: test_errors.py 프로젝트: ra2003/urubu
def test_undef_key():
    with cd('undef_key'):
        with raises_kind(UrubuError, _error.undef_key):
            project.build()
예제 #25
0
def test_undef_key():
    with cd('undef_key'):
        with raises_kind(UrubuError, _error.undef_key):
            project.build()
예제 #26
0
파일: test_errors.py 프로젝트: ra2003/urubu
def test_undef_layout():
    with cd('undef_layout'):
        with raises_kind(UrubuError, _error.undef_info):
            project.build()
예제 #27
0
def test_undef_reflink_title():
    with cd('undef_reflink_title'):
        with raises_kind(UrubuError, _error.undef_reflink_key):
            project.build()
예제 #28
0
파일: test_errors.py 프로젝트: ra2003/urubu
def test_no_index():
    with cd('no_index'):
        with raises_kind(UrubuError, _error.no_index):
            project.build()
예제 #29
0
def test_undef_layout():
    with cd('undef_layout'):
        with raises_kind(UrubuError, _error.undef_info):
            project.build()
예제 #30
0
def test_undef_anchor():
    with cd('undef_anchor'):
        with pytest.warns(UrubuWarning) as record:
            project.build()
        assert len(record) == 1
        assert _warning.undef_anchor in str(record[0].message)
예제 #31
0
def test_undef_ref():
    with cd('undef_ref'):
        with raises_kind(UrubuError, _error.undef_ref):
            project.build()