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_first_sitedir_index(self):
with mock.patch.object(sys, "path", ["site-packages", "dir", "dir", "dir"]):
assert _first_sitedir_index() == 0
with mock.patch.object(sys, "path", []):
assert _first_sitedir_index() is None