fix tests

This commit is contained in:
Sina Atalay
2025-01-07 13:16:51 +03:00
parent 050801b695
commit 97cb474bc8
2 changed files with 4 additions and 3 deletions

View File

@@ -59,7 +59,7 @@ dependencies = [
'Jinja2==3.1.3', # to generate Typst and Markdown files
'phonenumbers==8.13.52', # to validate phone numbers
'email-validator==2.2.0', # to validate email addresses
'pydantic==2.9.2', # to validate and parse the input file
'pydantic==2.9.2', # to validate and parse the input file
'pycountry==24.6.1', # for ISO 639-3 validation
'pydantic-extra-types==2.10.1', # to validate some extra types
]
@@ -259,6 +259,7 @@ exclude_lines = ["if __name__ == .__main__.:"]
[tool.pytest.ini_options]
addopts = [
"-ra", # Show extra test summary info for all tests
"-v", # Increase verbosity
"--strict-markers", # Don't allow unknown markers
"--strict-config", # Always fail if there are unknown configuration options
]

View File

@@ -24,7 +24,7 @@ from rendercv.renderer import templater
# the output. Setting update_testdata to True will update the reference files with
# the latest RenderCV. This should be done with caution, as it will overwrite the
# reference files with the latest output.
update_testdata = True
update_testdata = False
# copy sample entries from docs/update_rendercv_files.py:
education_entry_dictionary = {
@@ -427,7 +427,7 @@ def are_these_two_files_the_same(file1: pathlib.Path, file2: pathlib.Path) -> bo
if extension1 == ".pdf":
pages1 = pypdf.PdfReader(file1).pages
pages2 = pypdf.PdfReader(file2).pages
return len(pages1) != len(pages2)
return len(pages1) == len(pages2)
# for i in range(len(pages1)):
# if pages1[i].extract_text() != pages2[i].extract_text():