Releases: darrenburns/ward
0.54.0b0 - Conditional skip and xfail
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:
0.53.0b0 - Support relative imports
Relative imports are now supported in test modules and dependencies.
0.52.1b0 - test modules added to sys.modules
Test modules will now be added to sys.modules
.
0.52.0b0 - Support for `pdb.set_trace()` and `breakpoint()`
0.51.2b0 - Fix minor display issue
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`
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
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:
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:
Contribution by @JoshKarpel
Rich: https://github.com/willmcgugan/rich/
0.50.0b0 - Command line tab completion
0.49.0b0 - Using Rich for test output
0.48.0b0
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!