From 1b2d6aff6ccf72fdb292a1f05bb41bf9633a8f55 Mon Sep 17 00:00:00 2001 From: David Luevano Alvarado Date: Tue, 25 Apr 2023 04:03:48 -0600 Subject: refactor tests and add more typing --- tests/io_files/__init__.py | 0 tests/io_files/md/__init__.py | 0 tests/io_files/md/a/__init__.py | 0 tests/io_files/md/a/second.md | 12 ------- tests/io_files/md/first.md | 10 ------ tests/io_files/md/new.md | 10 ------ tests/io_files/multiple.yaml | 55 ----------------------------- tests/io_files/multiple_one_doc_error.yaml | 48 ------------------------- tests/io_files/simple.yaml | 28 --------------- tests/io_files/simple_missing_dirs.yaml | 21 ----------- tests/io_files/simple_missing_key.yaml | 29 --------------- tests/io_files/simple_missing_root_dir.yaml | 22 ------------ 12 files changed, 235 deletions(-) delete mode 100644 tests/io_files/__init__.py delete mode 100644 tests/io_files/md/__init__.py delete mode 100644 tests/io_files/md/a/__init__.py delete mode 100644 tests/io_files/md/a/second.md delete mode 100644 tests/io_files/md/first.md delete mode 100644 tests/io_files/md/new.md delete mode 100644 tests/io_files/multiple.yaml delete mode 100644 tests/io_files/multiple_one_doc_error.yaml delete mode 100644 tests/io_files/simple.yaml delete mode 100644 tests/io_files/simple_missing_dirs.yaml delete mode 100644 tests/io_files/simple_missing_key.yaml delete mode 100644 tests/io_files/simple_missing_root_dir.yaml (limited to 'tests/io_files') diff --git a/tests/io_files/__init__.py b/tests/io_files/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/tests/io_files/md/__init__.py b/tests/io_files/md/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/tests/io_files/md/a/__init__.py b/tests/io_files/md/a/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/tests/io_files/md/a/second.md b/tests/io_files/md/a/second.md deleted file mode 100644 index cb4e333..0000000 --- a/tests/io_files/md/a/second.md +++ /dev/null @@ -1,12 +0,0 @@ -title: Second blog post for testing purposes -author: David Luévano - Someone Else -lang: en -summary: This is just a post used for testing (the second). -tags: test - english - short - update - multiple-author - -A second "blog entry" for testing purposes which uses multiple authors and is inside a subdirectory. diff --git a/tests/io_files/md/first.md b/tests/io_files/md/first.md deleted file mode 100644 index 567ea3e..0000000 --- a/tests/io_files/md/first.md +++ /dev/null @@ -1,10 +0,0 @@ -title: First blog post for testing purposes -author: David Luévano -lang: en -summary: This is just a post used for testing. -tags: test - english - short - update - -Even though I have this "blog" subdomain and page setup, doesn't mean I'll be blogging for pyssg, this is just to serve as an example for the types of sites that pyssg can be used for. \ No newline at end of file diff --git a/tests/io_files/md/new.md b/tests/io_files/md/new.md deleted file mode 100644 index ce684a7..0000000 --- a/tests/io_files/md/new.md +++ /dev/null @@ -1,10 +0,0 @@ -title: New file -author: David Luévano -lang: en -summary: New file used for testing the database. -tags: test - english - short - update - -This is a sample markdown file used for testing pyssg. \ No newline at end of file diff --git a/tests/io_files/multiple.yaml b/tests/io_files/multiple.yaml deleted file mode 100644 index 8d99c40..0000000 --- a/tests/io_files/multiple.yaml +++ /dev/null @@ -1,55 +0,0 @@ -%YAML 1.2 ---- -define: &root "$PYSSG_HOME/pyssg/site_example/" - -title: "Example site" -path: - src: !join [*root, "src"] - dst: !join [*root, "dst"] - plt: !join [*root, "plt"] - db: !join [*root, ".files"] -url: - main: "https://example.com" - static: "https://static.example.com" - default_image: "images/default.png" -fmt: - date: "%a, %b %d, %Y @ %H:%M %Z" - list_date: "%b %d" - list_sep_date: "%B %Y" -dirs: - /: - cfg: - plt: "page.html" - tags: False - index: False - rss: False - sitemap: False - exclude_dirs: [] -... ---- -define: &root "$PYSSG_HOME/pyssg/site_example/" - -title: "Example site" -path: - src: !join [*root, "src"] - dst: !join [*root, "dst"] - plt: !join [*root, "plt"] - db: !join [*root, ".files"] -url: - main: "https://example.com" - static: "https://static.example.com" - default_image: "images/default.png" -fmt: - date: "%a, %b %d, %Y @ %H:%M %Z" - list_date: "%b %d" - list_sep_date: "%B %Y" -dirs: - /: - cfg: - plt: "page.html" - tags: False - index: False - rss: False - sitemap: False - exclude_dirs: [] -... \ No newline at end of file diff --git a/tests/io_files/multiple_one_doc_error.yaml b/tests/io_files/multiple_one_doc_error.yaml deleted file mode 100644 index 86f6546..0000000 --- a/tests/io_files/multiple_one_doc_error.yaml +++ /dev/null @@ -1,48 +0,0 @@ -%YAML 1.2 ---- -define: &root "$PYSSG_HOME/pyssg/site_example/" - -title: "Example site" -path: - src: !join [*root, "src"] - dst: !join [*root, "dst"] - plt: !join [*root, "plt"] - db: !join [*root, ".files"] -url: - main: "https://example.com" - static: "https://static.example.com" - default_image: "images/default.png" -fmt: - date: "%a, %b %d, %Y @ %H:%M %Z" - list_date: "%b %d" - list_sep_date: "%B %Y" -dirs: - /: - cfg: - plt: "page.html" - tags: False - index: False - rss: False - sitemap: False - exclude_dirs: [] -... ---- -define: &root "$PYSSG_HOME/pyssg/site_example/" - -title: "Example site" -path: - src: !join [*root, "src"] - dst: !join [*root, "dst"] - plt: !join [*root, "plt"] - db: !join [*root, ".files"] -url: - main: "https://example.com" - static: "https://static.example.com" - default_image: "images/default.png" -fmt: - date: "%a, %b %d, %Y @ %H:%M %Z" - list_date: "%b %d" - list_sep_date: "%B %Y" -dirs: - # just removing all paths as it will cause an error -... \ No newline at end of file diff --git a/tests/io_files/simple.yaml b/tests/io_files/simple.yaml deleted file mode 100644 index df3888b..0000000 --- a/tests/io_files/simple.yaml +++ /dev/null @@ -1,28 +0,0 @@ -%YAML 1.2 ---- -define: &root "$PYSSG_HOME/pyssg/site_example/" - -title: "Example site" -path: - src: !join [*root, "src"] - dst: !join [*root, "dst"] - plt: !join [*root, "plt"] - db: !join [*root, ".files"] -url: - main: "https://example.com" - static: "https://static.example.com" - default_image: "images/default.png" -fmt: - date: "%a, %b %d, %Y @ %H:%M %Z" - list_date: "%b %d" - list_sep_date: "%B %Y" -dirs: - /: - cfg: - plt: "page.html" - tags: False - index: False - rss: False - sitemap: False - exclude_dirs: [] -... \ No newline at end of file diff --git a/tests/io_files/simple_missing_dirs.yaml b/tests/io_files/simple_missing_dirs.yaml deleted file mode 100644 index aa15fb5..0000000 --- a/tests/io_files/simple_missing_dirs.yaml +++ /dev/null @@ -1,21 +0,0 @@ -%YAML 1.2 ---- -define: &root "$PYSSG_HOME/pyssg/site_example/" - -title: "Example site" -path: - src: !join [*root, "src"] - dst: !join [*root, "dst"] - plt: !join [*root, "plt"] - db: !join [*root, ".files"] -url: - main: "https://example.com" - static: "https://static.example.com" - default_image: "images/default.png" -fmt: - date: "%a, %b %d, %Y @ %H:%M %Z" - list_date: "%b %d" - list_sep_date: "%B %Y" -dirs: -# test missing dirs -... \ No newline at end of file diff --git a/tests/io_files/simple_missing_key.yaml b/tests/io_files/simple_missing_key.yaml deleted file mode 100644 index ac81563..0000000 --- a/tests/io_files/simple_missing_key.yaml +++ /dev/null @@ -1,29 +0,0 @@ -%YAML 1.2 ---- -define: &root "$PYSSG_HOME/pyssg/site_example/" - -# test missing mandatory key -# title: "Example site" -path: - src: !join [*root, "src"] - dst: !join [*root, "dst"] - plt: !join [*root, "plt"] - db: !join [*root, ".files"] -url: - main: "https://example.com" - static: "https://static.example.com" - default_image: "images/default.png" -fmt: - date: "%a, %b %d, %Y @ %H:%M %Z" - list_date: "%b %d" - list_sep_date: "%B %Y" -dirs: - /: - cfg: - plt: "page.html" - tags: False - index: False - rss: False - sitemap: False - exclude_dirs: [] -... \ No newline at end of file diff --git a/tests/io_files/simple_missing_root_dir.yaml b/tests/io_files/simple_missing_root_dir.yaml deleted file mode 100644 index 07fa824..0000000 --- a/tests/io_files/simple_missing_root_dir.yaml +++ /dev/null @@ -1,22 +0,0 @@ -%YAML 1.2 ---- -define: &root "$PYSSG_HOME/pyssg/site_example/" - -title: "Example site" -path: - src: !join [*root, "src"] - dst: !join [*root, "dst"] - plt: !join [*root, "plt"] - db: !join [*root, ".files"] -url: - main: "https://example.com" - static: "https://static.example.com" - default_image: "images/default.png" -fmt: - date: "%a, %b %d, %Y @ %H:%M %Z" - list_date: "%b %d" - list_sep_date: "%B %Y" -dirs: -# test missing /: - something: -... \ No newline at end of file -- cgit v1.2.3-70-g09d2