Skip to content
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

Reworked documentation and formalize test suite #19

Merged
merged 12 commits into from
Apr 10, 2024
10 changes: 10 additions & 0 deletions conftest.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import pytest
import os


@pytest.fixture(autouse=True)
def skip_if_windows():
if os.name == "nt":
pytest.exit("Test suite not supported on Windows. Please use WSL.")
else:
yield
1 change: 1 addition & 0 deletions docs/.gitignore
FedericoCeratto marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
_build
Empty file added docs/_static/.gitkeep
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is to prevent a missing static path '_static' error during build

Empty file.
15 changes: 15 additions & 0 deletions docs/developers.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
Development
-----------

``dashing`` welcomes all contributions.

Testing
=======

We use ``pytest`` for the test suite, ``pyte`` to emulate a terminal, and ``pexpect`` to spawn a process and communicate
with the emulated terminal per test. ``pexpect`` does not fully support Windows, so the test suite can only run on WSL
for Windows users.

You can run the testsuite simply by running::

pytest
14 changes: 13 additions & 1 deletion docs/index.rst
Original file line number Diff line number Diff line change
@@ -1,11 +1,23 @@
dashing
-------

.. toctree::
:maxdepth: 2

developers

* :ref:`genindex`
* :ref:`modindex`

Installation
============

You can install the package with::

pip install dashing

Overview
========

.. automodule:: dashing
:members:
:members:
8 changes: 7 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,13 @@ dev = [
"pre-commit~=3.0",
"isort~=5.12",
"flake8-pyproject~=1.2",
"bump-my-version~=0.18"
"bump-my-version~=0.18",
"dashing[test]"
]
test = [
"pytest~=8.0",
"pyte~=0.8",
"pexpect~=4.9"
]

[tool.isort]
Expand Down