Clojure-Contrib

clojure.contrib.test-is use-fixtures function composes fixture functions repeatedly (Backport clojure #194)

Details

  • Type: Defect Defect
  • Status: Closed Closed
  • Resolution: Completed
  • Affects Version/s: None
  • Fix Version/s: None
  • Component/s: None
  • Labels:
    None

Description

For the clojure-1.0-compatibility branch, copy the fix from http://www.assembla.com/spaces/clojure/tickets/194-clojure-test-use-fixtures-function-composes-fixture-functions-repeatedly

If you call use-fixtures over and over again, it will simply compose the test deeper and deeper into a nesting of the fixture function.
(use-fixtures :each my-cleanup) (deftest my-messy-test [���])

Load that a few times and you end up running the equivalent of:
(my-cleanup (my-cleanup (my-cleanup my-messy-test))).

Activity

Hide
Assembla Importer added a comment -

mikehinchey said: [file:ajZUI6Ur0r3PnzeJe5aVNr]: patch copy of clojure 194

Show
Assembla Importer added a comment - mikehinchey said: [file:ajZUI6Ur0r3PnzeJe5aVNr]: patch copy of clojure 194

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: