Ejemplo n.º 1
0
    def test_absolute_path(self):
        config = self.config
        ctxt = Context(config=config)
        ctxt.push_source(mozpath.join(config.topsrcdir, 'foo', 'moz.build'))

        path = AbsolutePath(ctxt, '%/qux')
        self.assertEqual(path, '%/qux')
        self.assertEqual(path.full_path, '/qux')

        with self.assertRaises(ValueError):
            path = AbsolutePath(ctxt, '%qux')
Ejemplo n.º 2
0
    def test_absolute_path(self):
        config = self.config
        ctxt = Context(config=config)
        ctxt.push_source(mozpath.join(config.topsrcdir, "foo", "moz.build"))

        path = AbsolutePath(ctxt, "%/qux")
        self.assertEqual(path, "%/qux")
        self.assertEqual(path.full_path, "/qux")

        with self.assertRaises(ValueError):
            path = AbsolutePath(ctxt, "%qux")