Some small edits so that the package will be compatible with Python 3 (to close #20), using builtins from future .
Replace xrange with builtins.range
Replace unicode with builtins.str
The fix for mocking open is a little ugly but I tried a few different things and had little success.
test_load_bayes_net was failing in Python 3 due to the third tuple sorting as (1, 0) instead of (0, 1). As far as I could tell the bayes net parents are unordered, so I replaced the tuples with frozensets (assuming they need to be immutable), but feel free to reject if that assumption is incorrect.
Some small edits so that the package will be compatible with Python 3 (to close #20), using
builtins
fromfuture
.The fix for mocking open is a little ugly but I tried a few different things and had little success.
test_load_bayes_net
was failing in Python 3 due to the third tuple sorting as (1, 0) instead of (0, 1). As far as I could tell the bayes net parents are unordered, so I replaced the tuples with frozensets (assuming they need to be immutable), but feel free to reject if that assumption is incorrect.This change is