tools.namespace

Some tests depend upon Clojure hash for ordering

Details

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

Description

In particular there are several that do a topological sort of a dependency graph, and compare the returned node sequence against a single node order. In general there are many correct results for a topological sort, and the implementation's return order depends upon Clojure's hash function, recently changed.

Activity

Hide
Andy Fingerhut added a comment -

Patch tns-16-v1.diff is one way to make the tests independent of Clojure's hash function. It implements a topo-check function that determines whether a particular node sequence order is in a valid dependency order, i.e. is a subsequence of at least one topological sorting of the nodes.

Show
Andy Fingerhut added a comment - Patch tns-16-v1.diff is one way to make the tests independent of Clojure's hash function. It implements a topo-check function that determines whether a particular node sequence order is in a valid dependency order, i.e. is a subsequence of at least one topological sorting of the nodes.
Hide
Stuart Sierra added a comment -

Given that the current tests only use very small, hand-drawn graphs, I'm going to go with the brute-force approach for now.

But thanks for this patch. I'd like to hold on to it for possible future use with generated graphs and/or test.check.

Show
Stuart Sierra added a comment - Given that the current tests only use very small, hand-drawn graphs, I'm going to go with the brute-force approach for now. But thanks for this patch. I'd like to hold on to it for possible future use with generated graphs and/or test.check.
Hide
Stuart Sierra added a comment -

Included in release 0.2.6

Show
Stuart Sierra added a comment - Included in release 0.2.6

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: