Skip to content

Commit bc724ec

Browse files
authored
fix gpu CI test failure (#401)
Signed-off-by: Shuoyang Ding <shuoyangd@nvidia.com>
1 parent d14ac42 commit bc724ec

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

tests/test_read_simple_bitext.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,15 @@
2121

2222
# The source/target file paths will be concatenated as document ID in `ParallelDataset`, so we can't directly pass a `Path` object.
2323
@pytest.fixture
24-
def src_file():
25-
return Path("tests/bitext_data/toy.de").absolute().as_posix()
24+
def src_file(pytestconfig):
25+
root_dir = Path(pytestconfig.rootdir)
26+
return (root_dir / "tests" / "bitext_data" / "toy.de").absolute().as_posix()
2627

2728

2829
@pytest.fixture
29-
def tgt_file():
30-
return Path("tests/bitext_data/toy.en").absolute().as_posix()
30+
def tgt_file(pytestconfig):
31+
root_dir = Path(pytestconfig.rootdir)
32+
return (root_dir / "tests" / "bitext_data" / "toy.en").absolute().as_posix()
3133

3234

3335
class TestReadSimpleBitext:

0 commit comments

Comments
 (0)