Download Shareware and Freeware Software for Windows, Linux, Macintosh, PDA

line Home  |  About Us  |  Link To Us  |  FAQ  |  Contact

Serving Software Downloads in 956 Categories, Downloaded 50.341.862 Times

should_dsl 1.2.1 / 2.0 Alp

Company: Hugo Lopes Tavares
Date Added: September 04, 2013  |  Visits: 368

should_dsl

Report Broken Link
Printer Friendly Version


Product Homepage
Download (38 downloads)



should_dsl is a library which goal is to write should assertions in Python as clear and readable as possible.<br /><br />It would be good to be as close as:<br /><br />SOME_VALUE should be equal to ANOTHER VALUE<br />or<br />SOME_EXCEPTION should be thrown by SOME_CALLABLE<br />or<br />SOME_VALUE should not be into SOME_CONTAINER<br /><br />For using this DSL, you need to import all the module's namespace, as:<br /><br />from should_dsl import *<br /><br />For example:<br /><br />1 |should_be.equal_to| 1 # will be true<br />'should' |should_have| 'oul' # will also be true<br />3 |should_be.into| (0, 1, 2) # will raise a ShouldNotSatisfied exception<br /><br />The equal_to matcher verifies object equality. If you want to ensure identity, you must use should_be with no matcher:<br /><br />2 |should_be| 2<br /><br />A nice example of exceptions would be:<br /><br />def raise_zerodivisionerror():<br /> return 1/0<br />ZeroDivisionerror |should_be.thrown_by| raise_zerodivisionerror<br /><br />Both should_have and should_be have versions for negation:<br /><br />2 |should_not_be.into| [1, 3, 5] # will be true<br />'should' |should_not_have| 'oul' # will raise a ShouldNotSatisfied exception<br /><br />Extending the DSL with custom matchers is easy:<br /><br />@matcher<br />def the_square_root_of():<br /> import math<br /> return (lambda x, y: x == math.sqrt(y), "%s is %sthe square root of %s")<br /><br />3 |should_be.the_square_root_of| 9 # will be true<br />4 |should_be.the_square_root_of| 9 # will raise a ShouldNotSatisfiedException<br /><br />should-dsl is unittest-compatible, so, on a unittest test case, failures on should expectations will result on unittest failures, not errors.<br /><br /><br />#md5=74e6eb2a3fd9517a5d910a200b17c4aa<br /><br />#md5=5af49409f051c08e71ad970eee00eb00<br /><br />#md5=cd5807354e3f46556c2913ed42ed98ae

Requirements: No special requirements
Platforms: *nix, Linux
Keyword: Alp Bethe Square Root Dsl Errors Exceptions Failures Import Oul Raise Raise Zerodivisi Nerror Raise Zerodivisi Nerrorboth Return Should Be Should Have Shouldnotsatisfied True Unittest Versions
Users rating: 0/10

License: Freeware Size: 10.24 KB
USER REVIEWS
More Reviews or Write Review


SHOULD_DSL RELATED
Libraries  -  Quantum::Usrn 1.00
Quantum::Usrn - Square root of not.d SYNOPSIS use Quantum::Usrn; $noise = Usrn($value); $not_value = Usrn($noise); Provide the square root of not function (Usrn), used by weird Quantum Physicists. Applying Usrn to a value will produce...
3.07 KB  
Libraries  -  EQATEC Analytics GO 1.5.35
EQATEC Analytics is a SaaS solution that is designed to give a detailed answer to the question "how is our software used by our users?" Any organization developing software will like to know these answers, because they can help the organization...
1.62 MB  
Libraries  -  Bio::Root::Object 1.4
Bio::Root::Object is a core Perl 5 object. SYNOPSIS # Use this module as the root of your inheritance tree. Object Creation require Bio::Root::Object; $dad = new Bio::Root::Object(); $son = new Bio::Root::Object(-name => Junior, -parent...
4.7 MB  
Desktop Utilities  -  Root Actions Servicemenu 1.1.3 / 2.0
Root Actions servicemenu is a replacement/alternate for the default Edit-as-root servicemenu. It allows an admin user to perform several root only actions from konqueror (It of course asks for a password) Usage: The following actions can be...
12.29 KB  
Development Tools  -  GUI for Generalized Nonlinear Non-analytic Chi-Square Fitting 1.0
FitChiTool provides an interface similar to the Curve Fitting Toolbox to the fitChiSquare function.This allows you to perform fits using chi-square when measurement errors are known on linear or nonlinear models. It allows allows you to perform...
225.28 KB  
Utilities  -  MacSleep 1.1
This tool enables you to put your Mac to sleep, shutdown and log off after a defined time frame. You can set also the hibernate mode to put your Mac to deep sleep (saves Energy while sleeping). Additionally you can also use a already...
3.88 MB  
Utilities  -  fli4l 3.0.2
Fli4l is a single floppy distribution, Linux-based ISDN, DSL and Ethernet-Router. You can build it from an old 486 based pc with 16 megabyte memory, which is more than adequate for this purpose. The necessary boot-disk can be built under Unix,...
10.5 MB  
Communication  -  Generation of filtered BPSK with different pulse shaping 1.0
This program generates filtered BPSK with proper pulse shaping filters such as ideal Nyquist, Raised cosine, Square root raised cosine and Gaussian filters. Determine the power spectrum of filtered BPSK signals.
10 KB  
Education  -  Derivative Log Ratio Spread 1.0
Calculates derivative log ratio spread for copy number log ratio data per chromosome and overall. This is the standard deviation of the differences between adjacent points divided by the square root of 2. Missing values are skipped.
10.24 KB  
Java Based Databases  -  Smans data server 1.9
Smans server is a mobile content management system (CMS) of a Web site and a tool for development of a dynamic database-driven site. The server represents a set of Java servlets and possesses the following properties, facilitating a Web...
923.95 KB  
NEW DOWNLOADS IN LINUX SOFTWARE, PROGRAMMING
Linux Software  -  EasyEDA PCB Designer for Linux 2.0.0
EasyEDA, a great web based EDA(Electronics Design Automation) tool, online PCB tool, online PCB software for electronics engineers, educators, students, makers and enthusiasts. Theres no need to install any software. Just open EasyEDA in any...
34.4 MB  
Linux Software  -  wpCache® WordPress HTTP Cache 1.9
wpCache® is a high-performance, distributed object, caching system application, generic in nature, but intended for use in speeding up dynamic web applications, by decreasing database load time. wpCache® decreases dramatically the page...
3.51 MB  
Linux Software  -  Polling Autodialer Software 3.4
ICTBroadcast Auto Dialer software has a survey campaign for telephone surveys and polls. This auto dialer software automatically dials a list of numbers and asks them a set of questions that they can respond to, by using their telephone keypad....
488 B  
Linux Software  -  Total Video Converter Mac Free 3.5.5
Total Video Converter Mac Free developed by EffectMatrix Ltd is the official legal version of Total Video Converter which was a globally recognized brand since 2006. Total Video Converter Mac Free is a free but powerful all-in-one video...
17.7 MB  
Linux Software  -  Skeith mod_log_sql Analyzer 2.10beta2
Skeith is a php based front end for analyzing logs for Apache using mod_log_sql.
47.5 KB  
Programming  -  Cedalion for Linux 0.2.6
Cedalion is a programming language that allows its users to add new abstractions and define (and use) internal DSLs. Its innovation is in the fact that it uses projectional editing to allow the new abstractions to have no syntactic limitations.
471.04 KB  
Programming  -  Math::GMPf 0.29
Math::GMPf - perl interface to the GMP library's floating point (mpf) functions.
30.72 KB  
Programming  -  Net::Wire10 1.08
Net::Wire10 is a Pure Perl connector that talks to Sphinx, MySQL and Drizzle servers. Net::Wire10 implements the low-level network protocol, alias the MySQL wire protocol version 10, necessary for talking to one of the aforementioned...
30.72 KB  
Programming  -  logilab-common 0.56.2
a bunch of modules providing low level functionnalities shared among some python projects devel Please note that some of the modules have some extra dependencies. For instance, logilab.common.db will require a db-api 2.0 compliant...
174.08 KB  
Programming  -  OpenSSL for linux 1.0.0a
The OpenSSL Project is a collaborative effort to develop a robust, commercial-grade, full-featured, and Open Source toolkit implementing the Secure Sockets Layer (SSL v2/v3) and Transport Layer Security (TLS v1) protocols as well as a...
3.83 MB