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_libs():
flags = pkgconfig.libs(PACKAGE_NAME)
for flag in flags.split(' '):
assert flag in ('-L/usr/lib_gtk_foo', '-lgtk-3')
with pytest.raises(pkgconfig.PackageNotFoundError):
pkgconfig.libs('doesnotexist')