Exemplo n.º 1
0
    def test_list_props(self):
        props = list_spec_properties(ANN1)
        self.failUnlessEqual(props["Position"]["access"], "read")
        self.failUnlessEqual(props["Position"]["emit"], "false")
        self.failUnlessEqual(props["Position"]["type"], "s")

        self.failUnlessEqual(props["MinimumRate"]["emit"], "true")

        props = list_spec_properties(ANN2)
        self.failUnlessEqual(props["Foobar"]["emit"], "invalidates")
        self.failUnlessEqual(props["XXX"]["emit"], "false")
Exemplo n.º 2
0
    def test_list_props(self):
        props = list_spec_properties(ANN1)
        self.failUnlessEqual(props["Position"]["access"], "read")
        self.failUnlessEqual(props["Position"]["emit"], "false")
        self.failUnlessEqual(props["Position"]["type"], "s")

        self.failUnlessEqual(props["MinimumRate"]["emit"], "true")

        props = list_spec_properties(ANN2)
        self.failUnlessEqual(props["Foobar"]["emit"], "invalidates")
        self.failUnlessEqual(props["XXX"]["emit"], "false")
Exemplo n.º 3
0
    def test_filter_props(self):
        spec = filter_property_spec(ANN1, wl=["Position"])
        self.failUnlessEqual(list_spec_properties(spec).keys(), ["Position"])
        props = list_spec_properties(spec)
        self.failUnlessEqual(props["Position"]["emit"], "false")

        spec = filter_property_spec(ANN1, bl=["Position"])
        self.failUnlessEqual(list_spec_properties(spec).keys(), ["MinimumRate"])

        spec = filter_property_spec(ANN1)
        self.failUnlessEqual(len(list_spec_properties(spec).keys()), 2)
Exemplo n.º 4
0
    def test_filter_props(self):
        spec = filter_property_spec(ANN1, wl=["Position"])
        self.failUnlessEqual(list_spec_properties(spec).keys(), ["Position"])
        props = list_spec_properties(spec)
        self.failUnlessEqual(props["Position"]["emit"], "false")

        spec = filter_property_spec(ANN1, bl=["Position"])
        self.failUnlessEqual(
            list_spec_properties(spec).keys(), ["MinimumRate"])

        spec = filter_property_spec(ANN1)
        self.failUnlessEqual(len(list_spec_properties(spec).keys()), 2)