def test_class_context_and(self): """Ensure the class_context_and method behaves as expected for various cases""" self.assertEquals("b", ncf.class_context_and("any", "b")) self.assertEquals("a", ncf.class_context_and("a", "any")) self.assertEquals("a.b", ncf.class_context_and("a", "b")) self.assertEquals("a.B", ncf.class_context_and("a", "B")) self.assertEquals("(a.b).c", ncf.class_context_and("a.b", "c")) self.assertEquals("(a|b).(c&d)", ncf.class_context_and("a|b", "c&d")) self.assertEquals("c&d", ncf.class_context_and("any", "c&d")) self.assertEquals("c.d", ncf.class_context_and("any", "c.d")) self.assertEquals("a|b", ncf.class_context_and("a|b", "any")) self.assertEquals("any", ncf.class_context_and("any", "any"))
def test_class_context_and(self): """Ensure the class_context_and method behaves as expected for various cases""" self.assertEqual("b", ncf.class_context_and("any", "b")) self.assertEqual("a", ncf.class_context_and("a", "any")) self.assertEqual("a.b", ncf.class_context_and("a", "b")) self.assertEqual("a.B", ncf.class_context_and("a", "B")) self.assertEqual("(a.b).c", ncf.class_context_and("a.b", "c")) self.assertEqual("(a|b).(c&d)", ncf.class_context_and("a|b", "c&d")) self.assertEqual("c&d", ncf.class_context_and("any", "c&d")) self.assertEqual("c.d", ncf.class_context_and("any", "c.d")) self.assertEqual("a|b", ncf.class_context_and("a|b", "any")) self.assertEqual("any", ncf.class_context_and("any", "any"))