-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sanitize MD and initiate addition of tests #43
base: main
Are you sure you want to change the base?
Changes from 7 commits
65ba4e8
9ace6e3
b3ccc84
8af3feb
65e4d0c
4978b8a
190f483
9adbdb1
15047f1
6b57e0e
0d6d737
5ef9981
b56188a
ceedd36
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
name: Unit Test | ||
|
||
on: | ||
- push | ||
- pull_request | ||
|
||
jobs: | ||
typing: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out repository | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
yarikoptic marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: '3.10' | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
python -m pip install --upgrade tox | ||
|
||
- name: Run type checker | ||
yarikoptic marked this conversation as resolved.
Show resolved
Hide resolved
|
||
run: tox -e py3 |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -41,6 +41,11 @@ install_requires = | |
PyGithub ~= 2.0 | ||
ruamel.yaml ~= 0.15 | ||
|
||
[options.extras_require] | ||
test = | ||
pytest | ||
pytest-cov | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This isn't used by the test environment. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @yarikoptic Also, I would prefer it if, rather than defining a There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. why (what advantage) to list in a tool specific There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I generally do not support any other tools than tox nor directly invoking pytest. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I typically invoke pytest directly, and testing within debian and most often conda packages is done directly via pytest. it is odd to require some additional utility whenever pytest framework is already sufficient. |
||
|
||
[options.packages.find] | ||
where = src | ||
|
||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This file is unnecessary and should be removed. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
from solidation.__main__ import sanitize_md | ||
|
||
|
||
def test_sanitize_md() -> None: | ||
assert sanitize_md(r"[gh-actions](deps): Fix \n") \ | ||
== r"\[gh-actions\](deps): Fix \\n" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Made it such since we also have
Smoke Test
. Makes it more explicit on what is the difference between the two.