-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
529 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
[run] | ||
branch = True | ||
omit = | ||
*/env*/* | ||
*/tests/* | ||
*/.*/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
root = true | ||
|
||
[*] | ||
end_of_line = lf | ||
insert_final_newline = true | ||
charset = utf-8 | ||
trim_trailing_whitespace = true | ||
|
||
[*.{py,yml}] | ||
indent_style = space | ||
|
||
[*.py] | ||
indent_size = 4 | ||
|
||
[docs/**.py] | ||
max_line_length = 80 | ||
|
||
[*.rst] | ||
indent_size = 4 | ||
|
||
[Makefile] | ||
indent_style = tab | ||
|
||
[*.yml] | ||
indent_size = 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions | ||
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions | ||
|
||
name: tests | ||
|
||
on: | ||
push: | ||
branches: [ master ] | ||
pull_request: | ||
branches: [ master ] | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ${{ matrix.os }} | ||
|
||
strategy: | ||
matrix: | ||
include: | ||
- python: '3.9' | ||
toxenv: mypy | ||
os: ubuntu-latest | ||
|
||
- python: '3.9' | ||
toxenv: pylava | ||
os: ubuntu-latest | ||
|
||
- python: '3.9' | ||
toxenv: checkdoc | ||
os: ubuntu-latest | ||
|
||
- python: '3.6' | ||
toxenv: py36 | ||
os: ubuntu-latest | ||
- python: '3.7' | ||
toxenv: py37 | ||
os: ubuntu-latest | ||
- python: '3.8' | ||
toxenv: py38 | ||
os: ubuntu-latest | ||
- python: '3.9' | ||
toxenv: py39 | ||
os: ubuntu-latest | ||
|
||
- python: '3.6' | ||
toxenv: py36 | ||
os: macos-latest | ||
- python: '3.7' | ||
toxenv: py37 | ||
os: macos-latest | ||
- python: '3.8' | ||
toxenv: py38 | ||
os: macos-latest | ||
- python: '3.9' | ||
toxenv: py39 | ||
os: macos-latest | ||
|
||
- python: '3.6' | ||
toxenv: py36 | ||
os: windows-latest | ||
- python: '3.7' | ||
toxenv: py37 | ||
os: windows-latest | ||
- python: '3.8' | ||
toxenv: py38 | ||
os: windows-latest | ||
- python: '3.9' | ||
toxenv: py39 | ||
os: windows-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python ${{ matrix.python }} | ||
uses: actions/setup-python@v1 | ||
with: | ||
python-version: ${{ matrix.python }} | ||
|
||
- name: Install tox | ||
env: | ||
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_TOKEN }} | ||
TOXENV: ${{ matrix.toxenv }} | ||
run: pip install tox wheel | ||
|
||
- name: Tests | ||
env: | ||
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_TOKEN }} | ||
FORCE_COLOR: yes | ||
TOXENV: ${{ matrix.toxenv }} | ||
run: tox |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,166 @@ | ||
# Created by .ignore support plugin (hsz.mobi) | ||
### VirtualEnv template | ||
# Virtualenv | ||
# http://iamzed.com/2009/05/07/a-primer-on-virtualenv/ | ||
.Python | ||
[Bb]in | ||
[Ii]nclude | ||
[Ll]ib | ||
[Ll]ib64 | ||
[Ll]ocal | ||
[Ss]cripts | ||
pyvenv.cfg | ||
.venv | ||
pip-selfcheck.json | ||
### IPythonNotebook template | ||
# Temporary data | ||
.ipynb_checkpoints/ | ||
### Python template | ||
# Byte-compiled / optimized / DLL files | ||
__pycache__/ | ||
*.py[cod] | ||
*$py.class | ||
|
||
# C extensions | ||
*.so | ||
|
||
# Distribution / packaging | ||
.Python | ||
env/ | ||
build/ | ||
develop-eggs/ | ||
dist/ | ||
downloads/ | ||
eggs/ | ||
.eggs/ | ||
lib/ | ||
lib64/ | ||
parts/ | ||
sdist/ | ||
var/ | ||
*.egg-info/ | ||
.installed.cfg | ||
*.egg | ||
|
||
# PyInstaller | ||
# Usually these files are written by a python script from a template | ||
# before PyInstaller builds the exe, so as to inject date/other infos into it. | ||
*.manifest | ||
*.spec | ||
|
||
# Installer logs | ||
pip-log.txt | ||
pip-delete-this-directory.txt | ||
|
||
# Unit test / coverage reports | ||
htmlcov/ | ||
.tox/ | ||
.coverage | ||
.coverage.* | ||
.cache | ||
nosetests.xml | ||
coverage.xml | ||
*,cover | ||
.hypothesis/ | ||
|
||
# Translations | ||
*.mo | ||
*.pot | ||
|
||
# Django stuff: | ||
*.log | ||
local_settings.py | ||
|
||
# Flask stuff: | ||
instance/ | ||
.webassets-cache | ||
|
||
# Scrapy stuff: | ||
.scrapy | ||
|
||
# Sphinx documentation | ||
docs/_build/ | ||
docs/source/apidoc | ||
|
||
# PyBuilder | ||
target/ | ||
|
||
# IPython Notebook | ||
.ipynb_checkpoints | ||
|
||
# pyenv | ||
.python-version | ||
|
||
# celery beat schedule file | ||
celerybeat-schedule | ||
|
||
# dotenv | ||
.env | ||
|
||
# virtualenv | ||
venv/ | ||
ENV/ | ||
|
||
# Spyder project settings | ||
.spyderproject | ||
|
||
# Rope project settings | ||
.ropeproject | ||
### JetBrains template | ||
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and Webstorm | ||
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839 | ||
|
||
# User-specific stuff: | ||
.idea/ | ||
|
||
## File-based project format: | ||
*.iws | ||
|
||
## Plugin-specific files: | ||
|
||
# IntelliJ | ||
/out/ | ||
|
||
# mpeltonen/sbt-idea plugin | ||
.idea_modules/ | ||
|
||
# JIRA plugin | ||
atlassian-ide-plugin.xml | ||
|
||
# Crashlytics plugin (for Android Studio and IntelliJ) | ||
com_crashlytics_export_strings.xml | ||
crashlytics.properties | ||
crashlytics-build.properties | ||
fabric.properties | ||
|
||
/htmlcov | ||
/temp | ||
.DS_Store | ||
|
||
/*/version.py | ||
|
||
.pytest_cache | ||
|
||
# Created by https://www.gitignore.io/api/vim | ||
# Edit at https://www.gitignore.io/?templates=vim | ||
|
||
### Vim ### | ||
# Swap | ||
[._]*.s[a-v][a-z] | ||
[._]*.sw[a-p] | ||
[._]s[a-rt-v][a-z] | ||
[._]ss[a-gi-z] | ||
[._]sw[a-p] | ||
|
||
# Session | ||
Session.vim | ||
|
||
# Temporary | ||
.netrwhist | ||
*~ | ||
# Auto-generated tag files | ||
tags | ||
# Persistent undo | ||
[._]*.un~ | ||
|
||
# End of https://www.gitignore.io/api/vim |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
include README.rst |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
.. image:: https://coveralls.io/repos/github/mosquito/pytest-rst/badge.svg?branch=master | ||
:target: https://coveralls.io/github/mosquito/pytest-rst | ||
:alt: Coveralls | ||
|
||
.. image:: https://github.com/aiokitchen/pytest-rst/workflows/tox/badge.svg | ||
:target: https://github.com/aiokitchen/pytest-rst/actions?query=workflow%3Atox | ||
:alt: Actions | ||
|
||
.. image:: https://img.shields.io/pypi/v/pytest-rst.svg | ||
:target: https://pypi.python.org/pypi/pytest-rst/ | ||
:alt: Latest Version | ||
|
||
.. image:: https://img.shields.io/pypi/wheel/pytest-rst.svg | ||
:target: https://pypi.python.org/pypi/pytest-rst/ | ||
|
||
.. image:: https://img.shields.io/pypi/pyversions/pytest-rst.svg | ||
:target: https://pypi.python.org/pypi/pytest-rst/ | ||
|
||
.. image:: https://img.shields.io/pypi/l/pytest-rst.svg | ||
:target: https://pypi.python.org/pypi/pytest-rst/ | ||
|
||
|
||
pytest-rst run python tests in ReStructuredText | ||
=============================================== | ||
|
||
Code block must have ``:name:`` attribute starts with ``test_``. | ||
|
||
Example | ||
------- | ||
|
||
This block will running as a pytest test-case: | ||
|
||
.. code-block:: rst | ||
.. code-block:: python | ||
:name: test_first | ||
assert True | ||
.. code-block:: python | ||
:name: test_first | ||
assert True | ||
This block just not running: | ||
|
||
.. code-block:: rst | ||
.. code-block:: python | ||
# not a test | ||
assert False | ||
.. code-block:: python | ||
# not a test | ||
assert False | ||
Versioning | ||
---------- | ||
|
||
This software follows `Semantic Versioning`_ | ||
|
||
|
||
.. _Semantic Versioning: http://semver.org/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
[pylava] | ||
ignore=C901,E252 | ||
skip = *env*,.tox*,*build*,.* | ||
|
||
[pylava:pycodestyle] | ||
max_line_length = 80 |
Oops, something went wrong.