def test_eq_fail(self):
        properties = [prop for prop in self.pcomp.values()]
        pcomp = metocean.PropertyComponent('uri', properties)
        self.assertNotEqual(self.pcomp, pcomp)

        pcomp = metocean.PropertyComponent(self.pcomp.uri, properties[:-1])
        self.assertNotEqual(self.pcomp, pcomp)

        properties = [stock.property_cf_standard_name(),
                      stock.property_cf_units(),
                      stock.property_cf_type(),
                      stock.property_um_stash()]
        pcomp = metocean.PropertyComponent(self.pcomp.uri, properties)

        properties = [stock.property_cf_standard_name(),
                      stock.property_cf_units(),
                      stock.property_um_stash()]
        pcomp = metocean.PropertyComponent(self.pcomp.uri, properties)
        self.assertNotEqual(self.pcomp, pcomp)

        uri, name, value, operator = stock.property_cf_standard_name()
        properties = [metocean.Property(uri, name.data, value, operator),
                      stock.property_cf_units(),
                      stock.property_cf_type()]
        pcomp = metocean.PropertyComponent(self.pcomp.uri, properties)
        self.assertNotEqual(self.pcomp, pcomp)
    def test_contains(self):
        prop = stock.property_cf_standard_name()
        self.assertTrue(prop in self.pcomp)
        self.assertTrue(prop.name in self.pcomp)
        self.assertTrue(prop.name.data in self.pcomp)
        self.assertTrue(prop.name.notation in self.pcomp)

        prop = stock.property_um_stash()
        self.assertFalse(prop in self.pcomp)
        self.assertFalse(prop.name in self.pcomp)
        self.assertFalse(prop.name.data in self.pcomp)
        self.assertFalse(prop.name.notation in self.pcomp)
    def test_contains(self):
        prop = stock.property_cf_standard_name()
        self.assertTrue(prop in self.comp)
        self.assertTrue(prop.name in self.comp)
        self.assertTrue(prop.name.data in self.comp)
        self.assertTrue(prop.name.notation in self.comp)

        with self.assertRaises(TypeError):
            prop in self.ccomp
        with self.assertRaises(TypeError):
            prop.name in self.ccomp
        with self.assertRaises(TypeError):
            prop.name.data in self.ccomp
        with self.assertRaises(TypeError):
            prop.name.notation in self.ccomp

        prop = stock.property_um_stash()
        self.assertFalse(prop in self.comp)
        self.assertFalse(prop.name in self.comp)
        self.assertFalse(prop.name.data in self.comp)
        self.assertFalse(prop.name.notation in self.comp)
 def test_eq_fail(self):
     prop = metocean.Property(self.uri, self.name.data,
                              self.value, self.operator)
     self.assertNotEqual(self.prop, prop)
     prop = stock.property_um_stash()
     self.assertNotEqual(self.prop, prop)