From 0b109c1d434a96acbf639f237c0f8f40a1ca2bcc Mon Sep 17 00:00:00 2001 From: Darren Burns Date: Sat, 19 Oct 2019 13:01:12 +0100 Subject: [PATCH] Add note on xfail, emojis --- README.md | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index ccf965c4..e0e4f5e0 100644 --- a/README.md +++ b/README.md @@ -10,11 +10,11 @@ A modern Python test framework designed to help you find and fix flaws faster. This project is a work in progress. Some of the features that are currently available in a basic form are listed below. -* **Colourful, human readable output:** quickly pinpoint and fix issues with detailed output for failing tests. -* **Modular test dependencies:** manage test setup/teardown code using modular pytest-style fixtures. -* **Expect API:** A simple but powerful assertion API inspired by [Jest](https://jestjs.io). -* **Cross platform:** Tested on Mac OS, Linux, and Windows. -* **Zero config:** Sensible defaults mean running `ward` with no arguments is enough to get started. +* **๐ŸŽจ Colourful, human readable output:** quickly pinpoint and fix issues with detailed output for failing tests. +* **๐Ÿ“ฆ Modular test dependencies:** manage test setup/teardown code using modular pytest-style fixtures. +* **๐Ÿงช Expect API:** A simple but powerful assertion API inspired by [Jest](https://jestjs.io). +* **๐ŸŒ Cross platform:** Tested on Mac OS, Linux, and Windows. +* **๐Ÿง™โ€โ™‚๏ธ Zero config:** Sensible defaults mean running `ward` with no arguments is enough to get started. Planned features: @@ -176,6 +176,12 @@ def test_to_be_skipped(): pass ``` +### Expecting a test to fail + +You can mark a test that you expect to fail with the `@xfail` decorator. If a test +marked with this decorator passes unexpectedly, the overall run will be +considered a failure. + ### Testing for approximate equality Check that a value is close to another value. @@ -191,5 +197,5 @@ If you wish for Ward to cancel a run immediately after a specific number of fail you can use the `--fail-limit` option. To have a run end immediately after 5 tests fail: ```text -ward --fail-limit=5 +ward --fail-limit 5 ```