diff --git a/.appveyor.yml b/.appveyor.yml index 50f752a2e47d..90d522e92e89 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -15,7 +15,7 @@ environment: global: PYTHONIOENCODING: UTF-8 PYTEST_ARGS: -raR --numprocesses=auto --timeout=300 --durations=25 - --cov-report= --cov=lib -m "not network" + --cov-report= --cov=lib -m "not network" --log-level=DEBUG matrix: # theoretically the CONDA_INSTALL_LOCN could be only two: one for 32bit, diff --git a/.travis.yml b/.travis.yml index c3aa84fea282..80519a7b6710 100644 --- a/.travis.yml +++ b/.travis.yml @@ -70,7 +70,7 @@ env: - NPROC=2 - OPENBLAS_NUM_THREADS=1 - PYTHONFAULTHANDLER=1 - - PYTEST_ADDOPTS="-raR --maxfail=50 --timeout=300 --durations=25 --cov-report= --cov=lib -n $NPROC" + - PYTEST_ADDOPTS="-raR --maxfail=50 --timeout=300 --durations=25 --cov-report= --cov=lib -n $NPROC --log-level=DEBUG" - RUN_PYTEST=1 - RUN_FLAKE8= diff --git a/azure-pipelines.yml b/azure-pipelines.yml index b3ae38c8a57d..5ca99ecbbdcb 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -41,7 +41,7 @@ jobs: - script: | env - pytest --junitxml=junit/test-results.xml -raR --maxfail=50 --timeout=300 --durations=25 --cov-report= --cov=lib -n 2 + pytest --junitxml=junit/test-results.xml -raR --maxfail=50 --timeout=300 --durations=25 --cov-report= --cov=lib -n 2 --log-level=DEBUG displayName: 'pytest' - task: PublishTestResults@2 diff --git a/lib/matplotlib/font_manager.py b/lib/matplotlib/font_manager.py index 1e5f7e619529..91f058802ff2 100644 --- a/lib/matplotlib/font_manager.py +++ b/lib/matplotlib/font_manager.py @@ -1222,10 +1222,9 @@ def _findfont_cached(self, prop, fontext, directory, fallback_to_default, if not isinstance(prop, FontProperties): prop = FontProperties(prop) - fname = prop.get_file() + fname = prop.get_file() if fname is not None: - _log.debug('findfont returning %s', fname) return fname if fontext == 'afm': @@ -1236,19 +1235,19 @@ def _findfont_cached(self, prop, fontext, directory, fallback_to_default, best_score = 1e64 best_font = None + _log.debug('findfont: Matching %s.', prop) for font in fontlist: if (directory is not None and Path(directory) not in Path(font.fname).parents): continue - # Matching family should have highest priority, so it is multiplied - # by 10.0 - score = \ - self.score_family(prop.get_family(), font.name) * 10.0 + \ - self.score_style(prop.get_style(), font.style) + \ - self.score_variant(prop.get_variant(), font.variant) + \ - self.score_weight(prop.get_weight(), font.weight) + \ - self.score_stretch(prop.get_stretch(), font.stretch) + \ - self.score_size(prop.get_size(), font.size) + # Matching family should have top priority, so multiply it by 10. + score = (self.score_family(prop.get_family(), font.name) * 10 + + self.score_style(prop.get_style(), font.style) + + self.score_variant(prop.get_variant(), font.variant) + + self.score_weight(prop.get_weight(), font.weight) + + self.score_stretch(prop.get_stretch(), font.stretch) + + self.score_size(prop.get_size(), font.size)) + _log.debug('findfont: score(%s) = %s', font, score) if score < best_score: best_score = score best_font = font diff --git a/lib/matplotlib/tests/test_animation.py b/lib/matplotlib/tests/test_animation.py index c14b70a38725..d587271d5a91 100644 --- a/lib/matplotlib/tests/test_animation.py +++ b/lib/matplotlib/tests/test_animation.py @@ -215,6 +215,7 @@ def test_movie_writer_registry(): reason="animation writer not installed") @pytest.mark.parametrize("method_name", ["to_html5_video", "to_jshtml"]) def test_embed_limit(method_name, caplog, tmpdir): + caplog.set_level("WARNING") with tmpdir.as_cwd(): with mpl.rc_context({"animation.embed_limit": 1e-6}): # ~1 byte. getattr(make_animation(frames=1), method_name)()