From aaafda98e1fe57445de63c8a2e1119281e2df62c Mon Sep 17 00:00:00 2001 From: Fredrik Averpil Date: Fri, 27 Dec 2024 03:19:21 +0100 Subject: [PATCH] fix(test): backslashes needed for test on windows --- tests/test_integration.py | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/tests/test_integration.py b/tests/test_integration.py index 0d055899..42f9cd44 100644 --- a/tests/test_integration.py +++ b/tests/test_integration.py @@ -13,6 +13,7 @@ """ +import sys from pathlib import Path from typing import Any @@ -631,16 +632,26 @@ def test_ruamel( installed_dependencies = deps_and_imports_map.keys() imports = deps_and_imports_map.values() + if sys.platform == "win32": + contents = [ + "ruamel.yaml-0.18.6.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4", + "ruamel\\yaml\\__init__.py,sha256=2t1h--HjEw1ll5f5Y90KY7zXf4_4V1z5mSIEgoDZ1-o,1920", + "ruamel\\yaml\\__pycache__\\__init__.cpython-38.pyc,,", + "ruamel\\yaml\\anchor.py,sha256=tuPKumHX6SstzrNylamMffqJvOwnPspP3_z2Nbaezj0,481", + ] + else: + contents = [ + "ruamel.yaml-0.18.6.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4", + "ruamel/yaml/__init__.py,sha256=2t1h--HjEw1ll5f5Y90KY7zXf4_4V1z5mSIEgoDZ1-o,1920", + "ruamel/yaml/__pycache__/__init__.cpython-38.pyc,,", + "ruamel/yaml/anchor.py,sha256=tuPKumHX6SstzrNylamMffqJvOwnPspP3_z2Nbaezj0,481", + ] + for dependency_name in installed_dependencies: _ = venv_manager.create_record( site_packages_path=site_packages_path, dependency_name=dependency_name, - contents=[ - "ruamel.yaml-0.18.6.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4", - "ruamel/yaml/__init__.py,sha256=2t1h--HjEw1ll5f5Y90KY7zXf4_4V1z5mSIEgoDZ1-o,1920", - "ruamel/yaml/__pycache__/__init__.cpython-38.pyc,,", - "ruamel/yaml/anchor.py,sha256=tuPKumHX6SstzrNylamMffqJvOwnPspP3_z2Nbaezj0,481", - ], + contents=contents, ) source_files: list[Path] = []