BSD Ports

devel/py-kgb 7.3 NetBSD

Utilities for spying on function calls in unit tests

System
NetBSD
Repository
pkgsrc
Maintainer
[email protected]
License
mit
Categories
devel, python
Package size
114.3 KiB, 1145.7 KiB installed

Description

Ever deal with a large test suite before, monkey patching functions to figure out whether it was called as expected? It's a dirty job. If you're not careful, you can make a mess of things. Leave behind evidence.

kgb's spies will take care of that little problem for you.

What are spies?

Spies intercept and record calls to functions. They can report on how many times a function was called and with what arguments. They can allow the function call to go through as normal, to block it, or to reroute it to another function.

Spies are like mocks, but better. You're not mocking the world. You're replacing very specific function logic, or listening to functions without altering them.

Install

Binary package:

pkgin install py311-kgb

From pkgsrc:

cd /usr/pkgsrc/devel/py-kgb && make install clean

Packages

The version each package repository carries. “-” means the repository builds no package of it, “n/a” that there is no such repository.

RepositoryVersion
NetBSD 10.1 x86_647.3
NetBSD 10.1 aarch647.3
SmartOS / illumos x86_647.3
macOS 15 arm647.3

Dependency graph

Ports that need it on the left, what it needs to run on the right; at most 8 of each. "Dependencies" below lists them all.

Dependencies

Run dependencies 1

No port depends on this one.

Configuration

No options to configure.

Service scripts
none
Flavors
py312-kgb-7.3, py313-kgb-7.3, py314-kgb-7.3