Skip to content

Commit

Permalink
presents more test coverage, changes feature name to feature title, e…
Browse files Browse the repository at this point in the history
…xpands coverage options at the CLI and updates documentation
  • Loading branch information
gabrielfalcao committed Jan 19, 2024
1 parent b131b5e commit 4b8743a
Show file tree
Hide file tree
Showing 35 changed files with 586 additions and 369 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/pythonapp.yml
@@ -1,9 +1,10 @@
name: Sure Tests

on:
push:
branches:
- master
- runner
- master

jobs:
python:
Expand Down
55 changes: 1 addition & 54 deletions COPYING
@@ -1,4 +1,4 @@
Copyright (C) <2010-2022> Gabriel Falcão <gabriel@nacaolivre.org>
Copyright (C) <2010-2024> Gabriel Falcão <gabriel@nacaolivre.org>

GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Expand Down Expand Up @@ -621,56 +621,3 @@ Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.

END OF TERMS AND CONDITIONS

How to Apply These Terms to Your New Programs

If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.

To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.

<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.

Also add information on how to contact you by electronic and paper mail.

If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:

<program> Copyright (C) <year> <name of author>
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.

The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, your program's commands
might be different; for a GUI interface, you would use an "about box".

You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
<http://www.gnu.org/licenses/>.

The GNU General Public License does not permit incorporating your program
into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
3 changes: 1 addition & 2 deletions MANIFEST.in
@@ -1,4 +1,3 @@
include requirements.txt tox.ini
include requirements.txt
include COPYING
include README.rst
recursive-include tests *.py
6 changes: 3 additions & 3 deletions Makefile
Expand Up @@ -60,14 +60,14 @@ test tests:
# runs main command-line tool
run: | $(LIBEXEC_PATH)
$(LIBEXEC_PATH) --reap-warnings tests/crashes
$(LIBEXEC_PATH) --reap-warnings --special-syntax --with-coverage --cover-branches --cover-module=sure.core --cover-module=sure tests/runner
$(LIBEXEC_PATH) --reap-warnings --special-syntax --with-coverage --cover-branches --cover-module=sure --immediate --cover-module=sure --ignore tests/crashes tests
$(LIBEXEC_PATH) --reap-warnings --special-syntax --with-coverage --cover-branches --cover-erase --cover-module=sure.core --cover-module=sure tests/runner
$(LIBEXEC_PATH) --reap-warnings --special-syntax --with-coverage --cover-branches --cover-erase --cover-module=sure --immediate --cover-module=sure --ignore tests/crashes tests

push-release: dist # pushes distribution tarballs of the current version
$(VENV)/bin/twine upload dist/*.tar.gz

build-release:
$(VENV)/bin/python setup.py build sdist
$(VENV)/bin/python setup.py build sdist bdist_wheel
$(VENV)/bin/twine check dist/*.tar.gz

release: tests
Expand Down
3 changes: 0 additions & 3 deletions README.rst
Expand Up @@ -34,9 +34,6 @@ sure
.. image:: https://img.shields.io/github/v/tag/gabrielfalcao/sure
:target: https://github.com/gabrielfalcao/sure/releases

.. image:: https://img.shields.io/badge/pydoc-web-ff69b4.svg
:target: http://pydoc.net/sure

The sophisticated automated test tool for Python, featuring a test
runner and a library with powerful and flexible assertions.

Expand Down
1 change: 1 addition & 0 deletions development.txt
Expand Up @@ -7,3 +7,4 @@ tox==4.1.1
twine==3.4.1
pytest==7.4.3
pytest-cov==4.1.0
mock
3 changes: 3 additions & 0 deletions docs/source/api-reference.rst
Expand Up @@ -95,7 +95,10 @@ API Reference
------------------------

.. autoclass:: sure.doubles.dummies.Anything
.. autoclass:: sure.doubles.dummies.AnythingOfType
.. autoattribute:: sure.doubles.dummies.anything
.. autofunction:: sure.doubles.dummies.anything_of_type


``sure.doubles.fakes``
----------------------
Expand Down
11 changes: 11 additions & 0 deletions docs/source/assertion-reference.rst
Expand Up @@ -3,6 +3,17 @@
Assertion Builder Reference
===========================

Aliases
-------

.. code:: python
from sure import expects
expects("text").to.equal("text")
expects.that("text").equals("text")
Numerical Equality
------------------

Expand Down
6 changes: 3 additions & 3 deletions docs/source/changelog.rst
Expand Up @@ -4,8 +4,8 @@ Change Log
All notable changes to this project will be documented in this file.
This project adheres to `Semantic Versioning <http://semver.org/>`__.

[v3.0.0]
--------
v3.0.0
------

- Presents better documentation
- Drops support to Python 2 obliterates the ``sure.compat`` module
Expand Down Expand Up @@ -52,7 +52,7 @@ Fixed
Fixed
~~~~~

- Reading the version dinamically was causing import errors that caused
- Reading the version dynamically was causing import errors that caused
error when installing package. Refs #144

`v1.4.7 <https://github.com/gabrielfalcao/sure/compare/1.4.6...v1.4.7>`__
Expand Down
6 changes: 3 additions & 3 deletions docs/source/conf.py
Expand Up @@ -31,6 +31,7 @@
except ImportError:
sys.path.insert(0, Path(__file__).parent.parent.parent)

from sure import version
extensions = [
"sphinx.ext.autodoc",
"sphinx.ext.doctest",
Expand All @@ -47,8 +48,7 @@
project = "sure"
copyright = "2010-2024, Gabriel Falcão"
author = "Gabriel Falcão"
version = "3.0a0"
release = "3.0a0"
release = version
language = 'en'
exclude_patterns = []
pygments_style = "sphinx"
Expand Down Expand Up @@ -84,6 +84,6 @@
"python": ("https://docs.python.org/3/", None),
"mock": ("https://mock.readthedocs.io/en/latest/", None),
"psycopg2": ("https://www.psycopg.org/docs/", None),
"coverage": ("https://coverage.readthedocs.io/en/7.3.3/", None),
"coverage": ("https://coverage.readthedocs.io/en/7.4.0/", None),
}
pygments_style = 'xcode'
9 changes: 6 additions & 3 deletions setup.py
Expand Up @@ -86,9 +86,10 @@ def read_readme():
return __doc__


install_requires = ["mock", "coverage==7.4.0", "click==8.1.7", "couleur==0.7.4"]
tests_require = []
install_requires = ["coverage==7.4.0", "click==8.1.7", "couleur==0.7.4"]
tests_require = ["mock"]
version = read_version()
packages = find_packages(exclude=["*tests*", "*examples*"])

if __name__ == "__main__":
setup(
Expand All @@ -102,7 +103,7 @@ def read_readme():
maintainer="Gabriel Falcao",
maintainer_email="gabrielteratos@gmail.com",
include_package_data=True,
packages=find_packages(exclude=["*tests*"]),
packages=packages,
install_requires=install_requires,
long_description_content_type='text/x-rst',
entry_points={
Expand All @@ -118,11 +119,13 @@ def read_readme():
"Operating System :: POSIX :: Linux",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: Implementation",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
Expand Down

0 comments on commit 4b8743a

Please sign in to comment.