# Path: lanshark/observable.py
# class Observable(object):
#     def __init__(self):
#     def connect(self, event, callback):
#     def disconnect(self, event, callback):
#     def notify(self, event, *args):
# def test():
#     def callback(bar):


import os
import simplejson
from lanshark import observable
    from StringIO import StringIO
        i = Integer(0x29a, "doc of i")
        b = Boolean(False, "doc of b")
        j = JSON({"something": ["more", "complex\\"]}, "doc of j")
        j2 = JSON({"something": ["more", "complex"]}, "doc of j")
    config = TestConfig()
    assert TestConfig.s.__doc__ == "doc of s"
    assert config.s == "default"
    assert config.j["something"][1] == "complex\\"
    config.j["something"] = "different\\"
    assert config.j["something"] == "different\\"
    assert not config.b
    config.s = "not"
    config.s += " default"
    config.i = 0
    config.b = True
    f = StringIO()
    config.save(f)
    val = f.getvalue()
    assert "doc of s" in val
    assert "doc of j" in val
    assert "not default" in val
    config = TestConfig()
    assert config.s == "default"
    f.seek(0)
    config.load(f)
    assert config.j2["something"][1] == "complex"
    assert config.j["something"] == "different\\"
    assert config.s == "not default"
    assert config.i == 0
    assert config.b is True

# Path: lanshark/observable.py
# class Observable(object):
#     def __init__(self):
#     def connect(self, event, callback):
#     def disconnect(self, event, callback):
#     def notify(self, event, *args):
# def test():
#     def callback(bar):


# Path: lanshark/configuration.py
import os
import simplejson
from lanshark import observable
    from StringIO import StringIO

        i = Integer(0x29a, "doc of i")
        b = Boolean(False, "doc of b")
        j = JSON({"something": ["more", "complex\\"]}, "doc of j")
        j2 = JSON({"something": ["more", "complex"]}, "doc of j")
    config = TestConfig()
    assert TestConfig.s.__doc__ == "doc of s"
    assert config.s == "default"
    assert config.j["something"][1] == "complex\\"
    config.j["something"] = "different\\"
    assert config.j["something"] == "different\\"
    assert not config.b
    config.s = "not"
    config.s += " default"
    config.i = 0
    config.b = True
    f = StringIO()
    config.save(f)
    val = f.getvalue()
    assert "doc of s" in val
    assert "doc of j" in val
    assert "not default" in val
    config = TestConfig()
    assert config.s == "default"
    f.seek(0)
    config.load(f)
    assert config.j2["something"][1] == "complex"
    assert config.j["something"] == "different\\"
    assert config.s == "not default"
    assert config.i == 0
    assert config.b is True

    observable.test()