Skip to content

Commit 67b15e5

Browse files
committed
Convert README to Markdown
1 parent 3f4a71d commit 67b15e5

2 files changed

Lines changed: 15 additions & 16 deletions

File tree

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,47 @@
11
Python Asserts
22
==============
33

4-
.. image:: https://img.shields.io/pypi/l/asserts.svg
5-
:target: https://pypi.python.org/pypi/asserts/
6-
.. image:: https://img.shields.io/github/release/srittau/python-asserts/all.svg
7-
:target: https://github.com/srittau/python-asserts/releases/
8-
.. image:: https://img.shields.io/pypi/v/asserts.svg
9-
:target: https://pypi.python.org/pypi/asserts/
10-
.. image:: https://travis-ci.org/srittau/python-asserts.svg?branch=master
11-
:target: https://travis-ci.org/srittau/python-asserts
4+
[![License](https://img.shields.io/pypi/l/asserts.svg)](https://pypi.python.org/pypi/asserts/)
5+
[![GitHub](https://img.shields.io/github/release/srittau/python-asserts/all.svg)](https://github.com/srittau/python-asserts/releases/)
6+
[![pypi](https://img.shields.io/pypi/v/asserts.svg)](https://pypi.python.org/pypi/asserts/)
7+
[![Travis CI](https://travis-ci.org/srittau/python-asserts.svg?branch=master)](https://travis-ci.org/srittau/python-asserts)
128

139
Stand-alone Assertions for Python
1410

1511
This package provides a few advantages over the assertions provided by
1612
unittest.TestCase:
1713

1814
* Can be used stand-alone, for example:
19-
20-
* In test cases, not derived from TestCase.
21-
* In fake and mock classes.
22-
* In implementations as rich alternative to the assert statement.
23-
15+
* In test cases, not derived from TestCase.
16+
* In fake and mock classes.
17+
* In implementations as rich alternative to the assert statement.
2418
* PEP 8 compliance.
2519
* Custom stand-alone assertions can be written easily.
2620
* Arguably a better separation of concerns, since TestCase is responsible
2721
for test running only, if assertion functions are used exclusively.
2822

2923
There are a few regressions compared to assertions from TestCase:
3024

31-
* The default assertion class (AssertionError) can not be overwritten. This
25+
* The default assertion class (`AssertionError`) can not be overwritten. This
3226
is rarely a problem in practice.
33-
* asserts does not support the addTypeEqualityFunc() functionality.
27+
* asserts does not support the `addTypeEqualityFunc()` functionality.
3428

3529
Usage:
3630

31+
```python
3732
>>> from asserts import assert_true, assert_equal, assert_raises
3833
>>> my_var = 13
3934
>>> assert_equal(13, my_var)
4035
>>> assert_true(True, msg="custom failure message")
4136
>>> with assert_raises(KeyError):
4237
... raise KeyError()
38+
```
4339

4440
Failure messages can be customized:
4541

42+
```python
4643
>>> assert_equal(13, 14, msg_fmt="{got} is wrong, expected {expected}")
4744
Traceback (most recent call last):
4845
...
4946
AssertionError: 14 is wrong, expected 13
47+
```

setup.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ def read(fname):
1212
name="asserts",
1313
version="0.10.0",
1414
description="Stand-alone Assertions",
15-
long_description=read("README.rst"),
15+
long_description=read("README.md"),
16+
long_description_content_type="text/markdown",
1617
author="Sebastian Rittau",
1718
author_email="srittau@rittau.biz",
1819
url="https://github.com/srittau/python-asserts",

0 commit comments

Comments
 (0)