test_o3de_codeowners.py 773 B

12345678910111213141516171819202122
  1. """
  2. Copyright (c) Contributors to the Open 3D Engine Project.
  3. For complete copyright and license terms please see the LICENSE at the root of this distribution.
  4. SPDX-License-Identifier: Apache-2.0 OR MIT
  5. Environmentally-dependent tests for ly_test_tools.cli.codeowners_hint
  6. """
  7. import os
  8. import ly_test_tools.cli.codeowners_hint as hint
  9. def test_FindCodeowners_ThisCWD_FindForO3DE():
  10. codeowners_path = hint.find_github_codeowners(os.path.abspath(__file__))
  11. assert codeowners_path
  12. assert ".github" in str(codeowners_path), "codeowners file has been tampered with, or test unexpectedly migrated"
  13. def test_FindCodeowners_ThisFilesystemRoot_NotFound():
  14. codeowners_path = hint.find_github_codeowners(os.path.abspath(os.sep))
  15. assert not codeowners_path