From 96cdae32f2122e0649eb7aa880d9b5a4a0a754d8 Mon Sep 17 00:00:00 2001 From: Sina Atalay Date: Sun, 10 Mar 2024 15:20:38 +0100 Subject: [PATCH] tests: fix test_transform_markdown_sections_to_latex_sections --- tests/test_renderer.py | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/tests/test_renderer.py b/tests/test_renderer.py index 97300a1..bb293fa 100644 --- a/tests/test_renderer.py +++ b/tests/test_renderer.py @@ -2,6 +2,7 @@ import math import filecmp import shutil import os +import copy import pathlib import pytest @@ -82,12 +83,16 @@ def test_markdown_to_latex(markdown_string, expected_latex_string): def test_transform_markdown_sections_to_latex_sections(rendercv_data_model): - r.transform_markdown_sections_to_latex_sections( - rendercv_data_model.cv.sections_input + new_data_model = copy.deepcopy(rendercv_data_model) + new_sections_input = r.transform_markdown_sections_to_latex_sections( + new_data_model.cv.sections_input ) - assert isinstance(rendercv_data_model, dm.RenderCVDataModel) - assert rendercv_data_model.cv.name == rendercv_data_model.cv.name - assert rendercv_data_model.design == rendercv_data_model.design + new_data_model.cv.sections_input = new_sections_input + + assert isinstance(new_data_model, dm.RenderCVDataModel) + assert new_data_model.cv.name == rendercv_data_model.cv.name + assert new_data_model.design == rendercv_data_model.design + assert new_data_model.cv.sections != rendercv_data_model.cv.sections @pytest.mark.parametrize(