How to use the pywatchman.capabilities.synthesize function in pywatchman

To help you get started, we’ve selected a few pywatchman examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github facebook / watchman / tests / integration / test_capabilities.py View on Github external
res,
            {
                "version": "1.0",
                "error": "client required capability `will-never-exist` "
                + "is not supported by this server",
                "capabilities": {"will-never-exist": False},
            },
        )

        res = pywatchman.capabilities.synthesize(
            {"version": "3.2"}, {"optional": ["relative_root"], "required": []}
        )
        self.assertDictEqual(
            res, {"version": "3.2", "capabilities": {"relative_root": False}}
        )
        res = pywatchman.capabilities.synthesize(
            {"version": "3.3"}, {"optional": ["relative_root"], "required": []}
        )
        self.assertDictEqual(
            res, {"version": "3.3", "capabilities": {"relative_root": True}}
        )