Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modyfing test/requirements.txt cause pytest fails #832

Closed
qarmin opened this issue Jul 1, 2023 · 1 comment
Closed

Modyfing test/requirements.txt cause pytest fails #832

qarmin opened this issue Jul 1, 2023 · 1 comment
Labels

Comments

@qarmin
Copy link

qarmin commented Jul 1, 2023

Error details
Changing test/requirements.txt file causes to show error in pytest - I have no idea what cause this .

This is why some of tests from #829 fails

simplescreenrecorder-2023-07-01_16.35.19.mp4

EDIT:
Looks that this line cause problems

EMBEDDED_FILE = HERE / "requirements.txt"

requirements file should not be used for tests.

Environment
Please provide the following information:

  • Operating System: Ubuntu 22.04
  • Python version: 3.7.17
  • fpdf2 version used: master branch
@qarmin qarmin added the bug label Jul 1, 2023
@qarmin qarmin changed the title Modyfing test/requirements.txt cause to fail pytest Modyfing test/requirements.txt cause to fail Jul 1, 2023
@qarmin qarmin changed the title Modyfing test/requirements.txt cause to fail Modyfing test/requirements.txt cause pytest fails Jul 1, 2023
@Lucas-C
Copy link
Member

Lucas-C commented Jul 3, 2023

Hi @qarmin

This is absolutely not a bug.
We simply have a unit test relying on the content of this file:
https://github.com/PyFPDF/fpdf2/blob/master/test/test_embed_file.py

A simple text search in the test/ directory would have easily revealed that.

This simply means that if you modify the content of test/requirements.txt in a PR,
you must re-generate the reference PDF files for test_embed_file.py,

Our documentation dedicated to code contributors will provide you explanations on how to do so:
https://pyfpdf.github.io/fpdf2/Development.html#why-is-a-test-failing

@Lucas-C Lucas-C closed this as completed Jul 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants