Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def test_capabilitySynth(self):
res = pywatchman.capabilities.synthesize(
{"version": "1.0"}, {"optional": ["will-never-exist"], "required": []}
)
self.assertDictEqual(
res, {"version": "1.0", "capabilities": {"will-never-exist": False}}
)
res = pywatchman.capabilities.synthesize(
{"version": "1.0"}, {"required": ["will-never-exist"], "optional": []}
)
self.assertDictEqual(
res,
{
"version": "1.0",
"error": "client required capability `will-never-exist` "
+ "is not supported by this server",
"capabilities": {"will-never-exist": False},
def test_capabilitySynth(self):
res = pywatchman.capabilities.synthesize(
{"version": "1.0"}, {"optional": ["will-never-exist"], "required": []}
)
self.assertDictEqual(
res, {"version": "1.0", "capabilities": {"will-never-exist": False}}
)
res = pywatchman.capabilities.synthesize(
{"version": "1.0"}, {"required": ["will-never-exist"], "optional": []}
)
self.assertDictEqual(
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(