adding latest

This commit is contained in:
2021-11-01 00:41:01 +00:00
parent 413f783475
commit 526dd733b5
12 changed files with 270 additions and 44 deletions

View File

@@ -1,22 +1,25 @@
# testing notes
## options
optional:
- user_input
- example
- template_filename
- template_path
required:
- base_path
- page_path
- filename
- extension
- name
## tests to write
- page with/without a template
- user input is None
- the given base path does not exist
- page using/not using input tokens
- user input does not match number of input tokens
- no user input
@@ -24,34 +27,13 @@ required:
- with/without example
- page using/not using date tokens
- page using/not using name tokens
- dry run
- path/page filenames can contain spaces and they are converted
## tests done
@dataclass
class PageCreatorOptions:
"""Options dataclass to create a Page.
Attributes:
base_path (str):
page_path (str):
filename (str):
extension (str):
name (str):
user_input (Collection[str] | None, optional):
example (str | None, optional):
template_filename (str | None, optional):
template_path (str | None, optional):
"""
base_path: str
page_path: str
filename: str
extension: str
name: str
user_input: Collection[str] | None = None
example: str | None = None
template_filename: str | None = None
template_path: str | None = None
- page with/without a template
- the given base path does not exist
- the given template file does not exist
- page already exists