Skip to content

Commit

Permalink
removed import of alternate tap module from unit-tests
Browse files Browse the repository at this point in the history
  • Loading branch information
trws authored and Thomas R. W. Scogland committed Jul 2, 2015
1 parent 13fdccc commit dd1ff39
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 4 deletions.
17 changes: 15 additions & 2 deletions src/bindings/python/flux/kvs.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,21 @@ def __len__(self):





@ffi.callback('KVSSetf')
def KVSWatchWrapper(key, value, arg, errnum):
j = Jobj(handle = value)
(cb, real_arg) = ffi.from_handle(arg)
return cb(key, json.loads(j.as_str()), real_arg, errnum)

kvswatches = {}
def watch(flux_handle, key, fun, arg):
warg = (fun, arg)
kvswatches[key] = warg
return raw.watch(flux_handle, key, KVSWatchWrapper, ffi.new_handle(warg))

def unwatch(flux_handle, key):
kvswatches.pop(key, None)
return raw.unwatch(flux_handle, key)



Expand Down
1 change: 0 additions & 1 deletion src/bindings/python/test/json_t.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import unittest
import errno
from flux.json_c import Jobj
import tap

json_str = '{ "a": 42 }'

Expand Down
1 change: 0 additions & 1 deletion src/bindings/python/test/request.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
import errno
import flux.core as core
import flux.json_c
import tap

json_str = '{"a":42}';
class TestRequestMethods(unittest.TestCase):
Expand Down

0 comments on commit dd1ff39

Please sign in to comment.