Skip to content

Releases: darrenburns/ward

0.54.0b0 - Conditional skip and xfail

02 Apr 18:32
Compare
Choose a tag to compare

Adds when param to @skip and @xfail decorators, allowing you to only apply them when some boolean or Callable predicate holds. e.g.

@skip("Skipped on Windows", when=platform.system() == "Windows")
@test("_build_package_name constructs package name '{pkg}' from '{path}'")
def _(
    pkg=each("", "foo", "foo.bar"),
    path=each("foo.py", "foo/bar.py", "foo/bar/baz.py"),
):
    m = ModuleType(name="")
    m.__file__ = path
    assert _build_package_name(m) == pkg


@skip("Skipped on Unix", when=platform.system() != "Windows")
@test("_build_package_name constructs package name '{pkg}' from '{path}'")
def _(
    pkg=each("", "foo", "foo.bar"),
    path=each("foo.py", "foo\\bar.py", "foo\\bar\\baz.py"),
):
    m = ModuleType(name="")
    m.__file__ = path
    assert _build_package_name(m) == pkg

When run on a non-Windows system:

image

0.53.0b0 - Support relative imports

02 Apr 02:50
Compare
Choose a tag to compare

Relative imports are now supported in test modules and dependencies.

0.52.1b0 - test modules added to sys.modules

02 Apr 00:03
Compare
Choose a tag to compare

Test modules will now be added to sys.modules.

0.52.0b0 - Support for `pdb.set_trace()` and `breakpoint()`

22 Mar 23:46
50ad3e0
Compare
Choose a tag to compare

Ward will automatically stop capturing output when a debugging session is started via pdb.set_trace() or breakpoint().

Screenshot 2021-03-22 at 23 24 46

0.51.2b0 - Fix minor display issue

21 Mar 21:52
Compare
Choose a tag to compare

Fixes a minor display issue where an extra line of space was being displayed above the code snippet output when an assertion failed.

0.51.1b0 - Lambdas can now be used inside `each`

21 Mar 02:15
Compare
Choose a tag to compare

Bugfix means that using lambdas inside each works as you would expect.

Thanks to @JoshKarpel for contributing this fix!

0.51.0b0 - `ward fixtures` migrated to use Rich library

19 Mar 15:43
1ac34e2
Compare
Choose a tag to compare

ward fixtures allows you to find test fixture dependencies and unused fixtures in your project by printing out

The ward fixtures --show-dependency-trees command now uses the Tree class from Rich to construct it's output:

image

The standard ward fixtures command which simply lists all fixtures that Ward is able to find in a project now also uses Rich for output:

image

Contribution by @JoshKarpel
Rich: https://github.com/willmcgugan/rich/

0.50.0b0 - Command line tab completion

19 Feb 14:45
Compare
Choose a tag to compare

Running ward completions will install a tab completion script for your terminal.

image

0.49.0b0 - Using Rich for test output

19 Feb 14:28
Compare
Choose a tag to compare

Migrates all output associated with ward test to the Rich library for terminal output.

image

0.48.0b0

10 Jul 15:34
Compare
Choose a tag to compare

Refactor and improvements to ward fixtures output, which allows you to view information about fixtures in your project and the tests that use them. Thanks @JoshKarpel!

Screenshot 2020-07-10 at 16 31 27