• Home
  • Most Popular
  • Submit
  • About Us
  • Contact Us

Softpile

Free Downloads

Categories
  • Home
  • Most Popular
  • Communications
  • Desktop
  • Games & Entertainment
  • Graphic Apps
  • Network & Internet
  • Security & Privacy
  • System Utilities
Alternative to itextsharp 2022.11.10347
IronPDF offers an itextsharp alternative for HTML to PDF conversion with C# code examples, documentation, and ...
VShell Server for Linux and Mac 4.8
VShell is a versatile and secure file transfer server that supports multiple protocols and is compatible ...
PDF Studio PDF Editor for Linux 2022
PDF Studio is a cost-effective PDF editor that delivers full compatibility with the PDF Standard. It's ...
VQ Probe for Linux 1.5
VQ Probe is a comprehensive software tool that enables objective and subjective video quality analysis. The ...
Resilient Server 2.3
This Debian GNU/Linux (Buster) based software has a customized partitioning scheme that enhances robustness against filesystem ...
Valentina Studio for Linux 9.6
Valentina Studio is a cross-platform GUI manager for Mac, Windows, and Linux. It allows users to ...
VPN Lifeguard for Linux 1.0.58
The software monitors VPN connection and automatically terminates apps during connection loss, re-establishes the connection and ...
G_Viewer 0.84
G_Viewer is a Linux software that serves as both a file system and photo/image viewer. It ...
Checksome File Hash Tool for Linux 1.1
This software allows for the generation and verification of file hashes. It is a quick and ...
KeyWrangler Password Manager for Linux 1.2
A password management software that is secure, offline and extensible. It offers military-grade encryption to protect ...
Home Linux should_dsl Download

should_dsl

October 27, 2009
Python assertion statements should be clear and readable.
Version 1.2.1
License MIT/X Consortium License
Platform Linux
Supported Languages English
Homepage github.com
Developed by Hugo Lopes Tavares
Should_dsl is an excellent library that allows Python programmers to write clear and readable should assertions with ease. This library aims to make the process of writing should assertions as close as possible to natural language, with examples such as "SOME_VALUE should be equal to ANOTHER_VALUE" or "SOME_EXCEPTION should be thrown by SOME_CALLABLE."

To use this DSL, one needs to import the entire module's namespace using "from should_dsl import *." Once imported, one could write code like "1 |should_be.equal_to| 1," which will be true, or "'should' |should_have| 'oul'," which will also be true. If the code does not satisfy the assertion, an exception will be raised. For instance, the code "3 |should_be.into| (0, 1, 2)" will raise a ShouldNotSatisfied exception.

Moreover, the equal_to matcher checks for object equality. When one wants to ensure the identity of objects, they can use should_be with no matcher, such as in "2 |should_be| 2."

Should_dsl also handles exceptions, and to verify if an exception is raised as intended, one could write code like "ZeroDivisionError |should_be.thrown_by| raise_zerodivisionerror."

Additionally, both should_have and should_be have versions for negation. For instance, "2 |should_not_be.into| [1, 3, 5]" will be true, whereas "'should' |should_not_have| 'oul'" will raise a ShouldNotSatisfied exception.

Should-dsl is incredibly extensible, and users can extend the DSL with custom matchers easily. One can define custom matchers with the decorator @matcher, such as in the example "def the_square_root_of(): import math return (lambda x, y: x == math.sqrt(y), '%s is %sthe square root of %s')."

Finally, should-dsl is unittest-compatible, meaning that failures on should expectations will result in unittest failures, not errors. This ensures that the tests' outcome is more explicit, making debugging easier.
What's New

Version 1.2.1: N/A

Free Download 8K
304
  • Share on:

Most Popular

  1. Quicksilver Forums 1.4.2
    154
  2. Dvgrab 3.4
    102
  3. DynVPN 1.0
    89
  4. CherryTV 0.1
    81
  5. SlideMap 1.2.2
    80
  6. porm r2
    73
  7. Clewarecontrol 0.8
    72
  8. Java Games 1.0
    72
  9. Swiftfox 3.0b5pre-2
    71
  10. fuseftp 0.8
    71

Related Downloads

Nao
Nao, a UNIX file manager, offers great power, flexibility, and configurability. It ...
GDM
GNOME Display Manager is a software that enables users to log in, ...
KDE BlogLines ticker
KDE's BlogLines ticker is a minimalistic program that runs in the system ...
Kpackage
KPackage is a package management tool belonging to the KDE project that ...
eyelock3d
Eyelock3d is a session locking software that enables users to secure their ...
FTPWebLog
FTPWebLog is a free software combining FTP and WWW log reporting functions.
vtgrab
Vtgrab is screen monitoring software that enables users to keep track of ...
RadialNet
RadialNet offers a tool to visualize networks effectively.
EasyHotspot
EasyHotspot provides a different hotspot billing system solution.
MythTV for iPhone
Access your MythTV media center on the go with the MythTV Frontend ...
Copyright © 1999-2025 Softpile Free Downloads
  • Most Popular
  • Submit
  • About Us
  • Contact Us
  • Privacy Policy
  • Disclaimer
  • Terms of Use

Can we use your data to tailor ads for you?

Our partners will collect data and use cookies for ad personalization and measurement.

By choosing "I agree", closing this pop-up or clicking on any element on the page, you agree to the use of cookies to help us provide you with a better user experience.

Learn how Softpile and our partners collect and use data.

You can change your choice at any time in our privacy center.

Cookie Settings

Our website stores four types of cookies. At any time you can choose which cookies you accept and which you refuse. You can read more about what cookies are and what types of cookies we store in our Cookie Policy.

are necessary for technical reasons. Without them, this website may not function properly.

are necessary for specific functionality on the website. Without them, some features may be disabled.

allow us to analyse website use and to improve the visitor's experience.

allow us to personalise your experience and to send you relevant content and offers, on this website and other websites.