Tag

monkey-patching

0 views collected around this technical thread.

Go Programming World
Go Programming World
May 22, 2024 · Backend Development

Using xgo for Monkey Patching, Mocking, Tracing, and Incremental Coverage in Go

This article introduces the xgo tool for Go, explains its cross‑platform monkey‑patching capabilities, demonstrates how to write unit tests with mock.Patch, shows installation, usage of Trap, Trace, and incremental coverage features, and evaluates its advantages and drawbacks for backend development.

CoverageGoTesting
0 likes · 15 min read
Using xgo for Monkey Patching, Mocking, Tracing, and Incremental Coverage in Go
Python Programming Learning Circle
Python Programming Learning Circle
May 18, 2024 · Fundamentals

Understanding Monkey Patching in Python: Concepts, Example, and Performance Boost

This article explains what monkey patching is in Python, demonstrates how to replace the standard json module with the faster ujson module using a simple runtime patch, and shows performance measurements before and after the patch to illustrate the speed improvement.

decoratormonkey-patchingperformance
0 likes · 4 min read
Understanding Monkey Patching in Python: Concepts, Example, and Performance Boost
Go Programming World
Go Programming World
May 16, 2024 · Backend Development

Using Monkey Patching with gomonkey for Unit Testing in Go

This article demonstrates how to apply Monkey Patching in Go using the gomonkey library to unit‑test a simple HTTP service, covering code examples, dependency analysis, patch creation, test execution parameters, and practical considerations such as inlining and concurrency limitations.

BackendGoHTTP
0 likes · 12 min read
Using Monkey Patching with gomonkey for Unit Testing in Go