Skip to main content

Effective Python Testing With Pytest



Testing your code brings a wide variety of benefits. It increases your confidence that the code behaves as you expect and ensures that changes to your code won’t cause regressions. Writing and maintaining tests is hard work, so you should leverage all the tools at your disposal to make it as painless as possible. pytest is one of the best tools that you can use to boost your testing productivity. read more...

Comments

Popular posts from this blog

Debugging Perl

The standard Perl distribution comes with a debugger, although it's really just another Perl program, perl5db.pl. Since it is just a program, I can use it as the basis for writing my own debuggers to suit my needs, or I can use the interface perl5db.pl provides to configure its actions. That's just the beginning, though. read more...

Perl wlan-ui

wlan-ui.pl is a program to connect to wireless networks. It can be run as a GUI which will offer a list of available networks to connect to.nstallation is simple and inelegant. Copy the program file (wlan-ui.pl) to a directory on your path. Next, create a new system configuration file to reflect your system. The system configuration file is different from the options configuration file (@configfile, above). The system configuration file tells the program how to configure the wireless interface, and the options configuration file sets defaults for access points and other things.

Reducing NumPy memory usage with lossless compression.

If you’re running into memory issues because your NumPy arrays are too large, one of the basic approaches to reducing memory usage is compression. By changing how you represent your data, you can reduce memory usage and shrink your array’s footprint—often without changing the bulk of your code. In this article we’ll cover:     * Reducing memory usage via smaller dtypes.     * Sparse arrays.     * Some situations where these solutions won’t work.