From: Boyuan Yang Date: Thu, 22 Jan 2026 16:38:40 -0500 Subject: Suit hardcoded topdir in test_utilities with pybuild Forwarded: not-needed --- tests/test_utilities.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/tests/test_utilities.py b/tests/test_utilities.py index 089b5e1..3aad1a5 100644 --- a/tests/test_utilities.py +++ b/tests/test_utilities.py @@ -27,32 +27,33 @@ def test_utilities_dir_exists_function_fails(): testdir = "tests/bogus" assert dir_exists(testdir) is False +DEBIAN_TESTTIME_TOPDIR = "build" def test_utilities_get_gitrootpath_function_returns_proper_path_cwd(): filepath = "CHANGELOG.md" gitdir_path = get_git_root_path(filepath) - assert os.path.basename(gitdir_path) == "font-v" + assert os.path.basename(gitdir_path) == DEBIAN_TESTTIME_TOPDIR assert os.path.isdir(gitdir_path) is True def test_utilities_get_gitrootpath_function_returns_proper_path_one_level_up(): filepath = "tests/test_utilities.py" gitdir_path = get_git_root_path(filepath) - assert os.path.basename(gitdir_path) == "font-v" + assert os.path.basename(gitdir_path) == DEBIAN_TESTTIME_TOPDIR assert os.path.isdir(gitdir_path) is True def test_utilities_get_gitrootpath_function_returns_proper_path_two_levels_up(): filepath = "tests/testfiles/Hack-Regular.ttf" gitdir_path = get_git_root_path(filepath) - assert os.path.basename(gitdir_path) == "font-v" + assert os.path.basename(gitdir_path) == DEBIAN_TESTTIME_TOPDIR assert os.path.isdir(gitdir_path) is True def test_utilities_get_gitrootpath_function_returns_proper_path_three_levels_up(): filepath = "tests/testfiles/deepdir/test.txt" gitdir_path = get_git_root_path(filepath) - assert os.path.basename(gitdir_path) == "font-v" + assert os.path.basename(gitdir_path) == DEBIAN_TESTTIME_TOPDIR assert os.path.isdir(gitdir_path) is True