Ward

Latest version: v0.68.0b0

Safety actively analyzes 630052 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 4 of 16

0.56.0b0

* Upgrades Ward to use Click v8 thanks to AABur.
* Splits some modules into internal/public, adds docs on some public APIs, more selectively exposes functionality to users.

0.55.0b0

Adds `--progress-style [inline|bar]` % progress through test session to output (enabled by default).

`inline`
![image](https://user-images.githubusercontent.com/5740731/118381181-3b78b400-b5e0-11eb-98cf-ad287035ad3a.png)

`bar`
![image](https://raw.githubusercontent.com/JoshKarpel/ward/3585a99cbecd296043bfe3e0065dacf33a41b7f7/docs/source/_static/ward_progress_bar.gif)

Thanks again to JoshKarpel for this contribution 🎉

0.54.0b0

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

python
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:

<img width="1286" alt="image" src="https://user-images.githubusercontent.com/5740731/113418236-fd6f5a00-93bc-11eb-8b72-e3c5c2aa31e4.png">

0.53.0b0

Relative imports are now supported in test modules and dependencies.

0.52.1b0

Test modules will now be added to `sys.modules`.

0.52.0b0

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

<img width="979" alt="Screenshot 2021-03-22 at 23 24 46" src="https://user-images.githubusercontent.com/5740731/112070666-0adb4780-8b66-11eb-90d8-88b0814b5da5.png">

Page 4 of 16

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.