RudManusachi

RudManusachi

Doctest functions with side effects

Hi there! :wave: It’s me again!

Lately I’ve been working on documentation for the project, including adding some context function usage examples, and wanted to “doctest” them for the sake of correctness. However, I noticed that most of the high level public functions have side effects.

In the following blog post I share how we could “doctest” those impure functions on the example from Mox’s documentation.

Where Next?

Popular Backend topics Top

New
First poster: bot
The run-time speed and memory usage of programs written in Rust should about the same as of programs written in C, but overall programmin...
New
First poster: malloryerik
Everyone outside of tech has heard of JavaScript, Java, Python, Ruby and even .Net, but few if any have heard of F#. However, F# may be o...
New
First poster: bot
Over the last few years, due in large part to the hype surrounding blockchain and cryptocurrencies, decentralized applications have gaine...
New
First poster: bot
This post explains why Scala projects are difficult to maintain. Scala is a powerful programming language that can make certain small te...
New
First poster: brennan
The perspective of an ignorant computer science undergrad It’s likely that you read the title of this post and thought “what is this guy ...
New
First poster: bot
At Grammarly, the foundation of our business, our core grammar engine, is written in Common Lisp. It currently processes more than a thou...
New
First poster: bot
Today we’ll just talk about integer casting, but Zig also provides explicit casting support for floats, bools, enums, pointers, and more....
New
tonyxrandall
When DoorDash approached the limits of what our Django-based monolithic codebase could support, we needed to design a new stack that woul...
New
brainlid
There is a new community resource available on writing “Safe Ecto Migrations”. When we get a migration wrong, it can lock up your product...
New

Other popular topics Top

ohm
Which, if any, games do you play? On what platform? I just bought (and completed) Minecraft Dungeons for my Nintendo Switch. Other than ...
New
Exadra37
I am thinking in building or buy a desktop computer for programing, both professionally and on my free time, and my choice of OS is Linux...
New
AstonJ
poll poll Be sure to check out @Dusty’s article posted here: An Introduction to Alternative Keyboard Layouts It’s one of the best write-...
New
AstonJ
Just done a fresh install of macOS Big Sur and on installing Erlang I am getting: asdf install erlang 23.1.2 Configure failed. checking ...
New
AstonJ
I have seen the keycaps I want - they are due for a group-buy this week but won’t be delivered until October next year!!! :rofl: The Ser...
New
AstonJ
Seems like a lot of people caught it - just wondered whether any of you did? As far as I know I didn’t, but it wouldn’t surprise me if I...
New
Margaret
Hello everyone! This thread is to tell you about what authors from The Pragmatic Bookshelf are writing on Medium.
1139 25652 757
New
PragmaticBookshelf
Build efficient applications that exploit the unique benefits of a pure functional language, learning from an engineer who uses Haskell t...
New
New
AnfaengerAlex
Hello, I’m a beginner in Android development and I’m facing an issue with my project setup. In my build.gradle.kts file, I have the foll...
New