diff --git a/tests/conftest.py b/tests/conftest.py index cacbd94..46b3529 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -7,8 +7,8 @@ import os TEST_FILE = 'Documents/1C/1c-code-templates/Надулич.st' def get_all_test_files(): - """Автоматически находим все файлы в директории""" - st_files = Path(__file__).parent.glob("data/*.st") + """Автоматически находим все файлы в директории тестовыйх данных.""" + st_files = Path(__file__).parent.glob("fixtures/*.st") list_st_files = [f for f in st_files if f.is_file()] list_st_files.append(Path.home()/TEST_FILE) @@ -23,10 +23,16 @@ def get_all_test_files(): @pytest.fixture(scope="class", name="test_file_path", params=get_all_test_files()) def test_data_path(request): + """ + Путь к каждому тестовому файлу. + """ return Path(request.param) @pytest.fixture(scope="class") def test_data(test_file_path): + """ + Данные каждого тестового файла. + """ file_data = test_file_path.read_text(encoding='utf-8-sig') return file_data diff --git a/tests/data/00-empty.st b/tests/fixtures/00-empty.st similarity index 100% rename from tests/data/00-empty.st rename to tests/fixtures/00-empty.st diff --git a/tests/data/01-one.st b/tests/fixtures/01-one.st similarity index 100% rename from tests/data/01-one.st rename to tests/fixtures/01-one.st diff --git a/tests/data/02-brackets.st b/tests/fixtures/02-brackets.st similarity index 87% rename from tests/data/02-brackets.st rename to tests/fixtures/02-brackets.st index 1bc72d7..3711dc9 100644 --- a/tests/data/02-brackets.st +++ b/tests/fixtures/02-brackets.st @@ -11,7 +11,7 @@ {"",0,0,"",""} }, {3, -{"^*%$#%@$$^%#$@",1,0,"",""}, +{"^_%$#%@$$^%#$@",1,0,"",""}, {0, {"$#\t\n%$^%I&^UKTYHRGER#@$",0,0,"%#@@@@@T"," *&%$#$@"} },