-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
adjust test_GraphicsBitmaps.py for newer renderpm #3767
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Starting with reportlab 3.6, the RenderPM error message relative to missing fonts does not start with "Can't setFont(" any more, but "Error in setFont(" instead. This breaks the test suite in case the font is indeed missing, while it used to be skipped instead. The main symptom is the test suite failing with error: Traceback (most recent call last): File "/tmp/autopkgtest-lxc.czuqoy9m/downtmp/autopkgtest_tmp/Tests/run_tests.py", line 275, in runTest suite = loader.loadTestsFromName(name) File "/usr/lib/python3.9/unittest/loader.py", line 154, in loadTestsFromName module = __import__(module_name) File "/tmp/autopkgtest-lxc.czuqoy9m/downtmp/autopkgtest_tmp/Tests/test_GraphicsBitmaps.py", line 119, in <module> real_test() File "/tmp/autopkgtest-lxc.czuqoy9m/downtmp/autopkgtest_tmp/Tests/test_GraphicsBitmaps.py", line 92, in real_test compare_plot.draw_to_file(output_file, "Testing Scatter Plots") File "/usr/lib/python3/dist-packages/Bio/Graphics/Comparative.py", line 96, in draw_to_file return _write(cur_drawing, output_file, self.output_format) File "/usr/lib/python3/dist-packages/Bio/Graphics/__init__.py", line 88, in _write return drawmethod.drawToFile(drawing, output_file, format, dpi=dpi) File "/usr/lib/python3/dist-packages/reportlab/graphics/renderPM.py", line 692, in drawToFile c = drawToPMCanvas(d, dpi=dpi, bg=bg, configPIL=configPIL, showBoundary=showBoundary,backend=backend) File "/usr/lib/python3/dist-packages/reportlab/graphics/renderPM.py", line 678, in drawToPMCanvas draw(d, c, 0, 0, showBoundary=showBoundary) File "/usr/lib/python3/dist-packages/reportlab/graphics/renderPM.py", line 49, in draw R.draw(renderScaledDrawing(drawing), canvas, x, y, showBoundary=showBoundary) File "/usr/lib/python3/dist-packages/reportlab/graphics/renderbase.py", line 185, in draw self.initState(x,y) #this is the push() File "/usr/lib/python3/dist-packages/reportlab/graphics/renderPM.py", line 96, in initState self.applyState() File "/usr/lib/python3/dist-packages/reportlab/graphics/renderPM.py", line 90, in applyState self._canvas.setFont(s['fontName'], s['fontSize']) File "/usr/lib/python3/dist-packages/reportlab/graphics/renderPM.py", line 406, in setFont _setFont(self._gs,fontName,fontSize) File "/usr/lib/python3/dist-packages/reportlab/graphics/utils.py", line 42, in setFont _errorDump(fontName,fontSize) File "/usr/lib/python3/dist-packages/reportlab/graphics/utils.py", line 29, in _errorDump rl_exec(code,dict(RenderPMError=RenderPMError)) File "<string>", line 1, in <module> reportlab.graphics.utils.RenderPMError: Error in setFont('Times-Roman',10) missing the T1 files? Originally <class 'TypeError'>: makeT1Font() argument 2 must be str, not None A full log is available on Debian continous integration platform [1]. [1]: https://ci.debian.net/data/autopkgtest/testing/arm64/p/python-biopython/16089190/log.gz This patch adds a pattern to match for the new error message as well.
Codecov Report
@@ Coverage Diff @@
## master #3767 +/- ##
==========================================
- Coverage 83.81% 82.13% -1.68%
==========================================
Files 318 298 -20
Lines 53063 49943 -3120
==========================================
- Hits 44475 41022 -3453
- Misses 8588 8921 +333
Continue to review full report at Codecov.
|
Thank you! |
Lucioric2000
pushed a commit
to Lucioric2000/biopython
that referenced
this pull request
Nov 14, 2021
Starting with reportlab 3.6, the RenderPM error message relative to missing fonts does not start with "Can't setFont(" any more, but "Error in setFont(" instead. This breaks the test suite in case the font is indeed missing, while it used to be skipped instead. The main symptom is the test suite failing with error: Traceback (most recent call last): ... reportlab.graphics.utils.RenderPMError: Error in setFont('Times-Roman',10) missing the T1 files? Originally <class 'TypeError'>: makeT1Font() argument 2 must be str, not None A full log is available on Debian continuous integration platform [1]. [1]: https://ci.debian.net/data/autopkgtest/testing/arm64/p/python-biopython/16089190/log.gz This patch adds a pattern to match for the new error message as well.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Greetings,
Starting with reportlab 3.6, the RenderPM error message relative to
missing fonts does not start with "Can't setFont(" any more, but
"Error in setFont(" instead. This breaks the test suite in case
the font is indeed missing, while it used to be skipped instead.
The main symptom is the test suite failing with error:
A full log is available on Debian continous integration platform.
This patch adds a pattern to match for the new error message as well.
I hereby agree to dual licence this and any previous contributions under both
the Biopython License Agreement AND the BSD 3-Clause License.
I have read the
CONTRIBUTING.rst
file, have runpre-commit
locally,and understand that AppVeyor and TravisCI will be used to confirm the Biopython unit
tests and style checks pass with these changes.
I have added my name to the alphabetical contributors listings in the files
NEWS.rst
andCONTRIB.rst
as part of this pull request, am listedalready, or do not wish to be listed. (This acknowledgement is optional.)