From bc724ec7e64f04814fed1df7d68e8bfd658914e3 Mon Sep 17 00:00:00 2001 From: shuoyangd Date: Mon, 2 Dec 2024 13:42:21 -0500 Subject: [PATCH] fix gpu CI test failure (#401) Signed-off-by: Shuoyang Ding --- tests/test_read_simple_bitext.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/tests/test_read_simple_bitext.py b/tests/test_read_simple_bitext.py index f9581a36..016109d1 100644 --- a/tests/test_read_simple_bitext.py +++ b/tests/test_read_simple_bitext.py @@ -21,13 +21,15 @@ # The source/target file paths will be concatenated as document ID in `ParallelDataset`, so we can't directly pass a `Path` object. @pytest.fixture -def src_file(): - return Path("tests/bitext_data/toy.de").absolute().as_posix() +def src_file(pytestconfig): + root_dir = Path(pytestconfig.rootdir) + return (root_dir / "tests" / "bitext_data" / "toy.de").absolute().as_posix() @pytest.fixture -def tgt_file(): - return Path("tests/bitext_data/toy.en").absolute().as_posix() +def tgt_file(pytestconfig): + root_dir = Path(pytestconfig.rootdir) + return (root_dir / "tests" / "bitext_data" / "toy.en").absolute().as_posix() class TestReadSimpleBitext: