diff options
author | Nikhil Ramakrishnan <ramakrishnan.nikhil@gmail.com> | 2018-08-04 17:22:37 +0530 |
---|---|---|
committer | Nikhil Ramakrishnan <ramakrishnan.nikhil@gmail.com> | 2018-08-04 17:22:37 +0530 |
commit | b580cbb9db33babafd7e0b0349a30f590bf8ac69 (patch) | |
tree | 806d1455c0f9784f2302b05c3f7dd8fdd99de82e /src/tools/docwriter/tests/test_siteconfig.py | |
parent | b83cf04d4a60c5a107970c0bbf339923613df071 (diff) | |
download | freetype2-GSoC-2018-nikhil.tar.gz |
Remove `docwriter' source (now a pip package).GSoC-2018-nikhil
`docwriter' can now be found at
https://github.com/freetype/docwriter
The PyPI project is published at
https://pypi.org/project/docwriter/
Development will continue on the GitHub repository.
* src/tools/docwriter: Remove this folder and its contents from the
repository.
Diffstat (limited to 'src/tools/docwriter/tests/test_siteconfig.py')
-rw-r--r-- | src/tools/docwriter/tests/test_siteconfig.py | 72 |
1 files changed, 0 insertions, 72 deletions
diff --git a/src/tools/docwriter/tests/test_siteconfig.py b/src/tools/docwriter/tests/test_siteconfig.py deleted file mode 100644 index 32fb00577..000000000 --- a/src/tools/docwriter/tests/test_siteconfig.py +++ /dev/null @@ -1,72 +0,0 @@ -# -# test_siteconfig.py -# -# Tests for site config generation (siteconfig.py). -# -# Copyright 2018 by -# Nikhil Ramakrishnan. -# -# This file is part of the FreeType project, and may only be used, -# modified, and distributed under the terms of the FreeType project -# license, LICENSE.TXT. By continuing to use, modify, or distribute -# this file you indicate that you have read the license and -# understand and accept it fully. - -"""Docwriter site config tests. - -This module tests the validity of the `yml` configuration -generated by `siteconfig.py`. -""" -import os - -import yaml - -import siteconfig -import utils - -config = siteconfig.SiteConfig() - -# Config vars -site_name = "Foo Bar Test" -site_description = "Test documentation for Foo Bar." -site_author = "Pytest" -toc_filename = "foo-toc.md" -index_filename = "foo-index.md" - -# Add chapters and pagess -c1_sec = ["c1s1", "c1s2", "c1s3"] -c2_sec = ["c2s1", "c2s2"] - -pages = {} -pages['chap1'] = c1_sec -pages['chap2'] = c2_sec - -def test_config( tmpdir, caplog ): - utils.output_dir = str( tmpdir ) - # Set site config - config.set_site_info( site_name, site_description, - site_author ) - # Add toc and index - config.add_single_page( "TOC", toc_filename ) - config.add_single_page( "Index", index_filename ) - - # Add chapters and pages - for chap, parts in pages.items(): - config.start_chapter( chap ) - for sec in parts: - config.add_chapter_page( sec, sec + ".md" ) - config.end_chapter() - - # Done, Build config - config.build_config() - - # Open file and parse yml - filepath = os.path.join( str( tmpdir ), 'mkdocs.yml' ) - result = open( filepath, 'rb' ).read() - data = yaml.safe_load(result) - - # Assertions - assert data is not None - for record in caplog.records: - # Strict build - there should be no warnings - assert record.levelname != 'WARNING' |