diff --git a/tests/test_parser.py b/tests/test_parser.py index fa05c65..8d7c8a9 100644 --- a/tests/test_parser.py +++ b/tests/test_parser.py @@ -1,4 +1,5 @@ # -*- coding: utf-8 -*- +import os import sys import threading @@ -41,7 +42,7 @@ def test_include(): def test_include_with_module_name_prefix(): - load('parser-cases/include.thrift', module_name='parser_cases.include_thrift') + load('parser-cases' + os.sep + 'include.thrift', module_name='parser_cases.include_thrift') assert sys.modules['parser_cases.include_thrift'] is not None assert sys.modules['parser_cases.included_thrift'] is not None assert sys.modules['parser_cases.include.included_1_thrift'] is not None @@ -50,7 +51,7 @@ def test_include_with_module_name_prefix(): def test_include_conflict(): with pytest.raises(ThriftParserError) as excinfo: - load('parser-cases/foo.bar.thrift', module_name='foo.bar_thrift') + load('parser-cases' + os.sep + 'foo.bar.thrift', module_name='foo.bar_thrift') assert 'Module name conflict between "parser-cases/foo.bar.thrift" and "parser-cases/foo/bar.thrift"' == str(excinfo.value)