rgf

Software Screenshot:
rgf
Software Details:
Version: 0.2.0.1
Upload Date: 14 Apr 15
Developer: Matt Patterson
Distribution Type: Freeware
Downloads: 109

Rating: 3.0/5 (Total Votes: 2)

rgf is a currently experimental attempt at an RSpec-esque BDD testing framework for Python.

Basically we're aiming for syntax along these lines:

from rgf import describe, it

with describe("That Thing"):
 @it("test desc")
 def spec(context):
 # test code here
 assert stuff()


x_spec.py files go in a directory structure under, by convention, spec/ in the root of your project and are run using:

rgf spec


The specifics of the syntax are currently wrong, being borrowed directly from RSpec. Suggestions warmly received.

(Current front-runners are subject and context in place of describe, keeping it for the spec decorator.)

Because the spec functions are just functions, not methods, and are hoovered up by the @it decorator they're effectively anonymous and can all have the same name for ease of thinking:

with subject('This Class'):
 @it('can calculate X')
 def s(world):
 pass

 @it('can account for Y')
 def s(world):
 pass


The aim is for something pythonic, with nested context and good spec names being the primary focus: minimum magic, minimum fuss.

What is new in this release:

  • Bump to update the Changelog, which I had neglected to do for 0.2.0 (sorry)

What is new in version 0.2.0:

  • Anonymous module collection of specs using randomly-generated module names. (fixes problems with imports of specs related to polluting sys.modules)

What is new in version 0.0.2:

  • Anonymous module collection of specs using randomly-generated module names. (fixes problems with imports of specs related to polluting sys.modules)

Requirements:

  • Python

Similar Software

matchmaker
matchmaker

14 Apr 15

NoseDBReport
NoseDBReport

20 Feb 15

grandma
grandma

11 May 15

tcsv2png
tcsv2png

11 May 15

Comments to rgf

Comments not found
Add Comment
Turn on images!