Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Switch testing to pytest completely#7974

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
dstansby merged 14 commits intomatplotlib:masterfromQuLogic:pytest
Feb 3, 2017
Merged
Changes from1 commit
Commits
Show all changes
14 commits
Select commitHold shift + click to select a range
6a91b9a
Use pip to install in AppVeyor too.
QuLogicJan 29, 2017
ab99e65
Rename test_only to avoid pytest collection.
QuLogicJan 31, 2017
bd91b93
Remove pytest collection filter.
QuLogicJan 31, 2017
25fdef8
Move pytest_configure into installed area.
QuLogicJan 31, 2017
c8fc318
Enable pytest-xdist on AppVeyor.
QuLogicJan 31, 2017
02d7cf8
Change stack level of Figure.gca warning.
QuLogicJan 31, 2017
30e40c6
Skip broken category test with NumPy < 1.8.0.
QuLogicJan 31, 2017
80281e9
Use pytest in matplotlib.test().
QuLogicFeb 1, 2017
c520c2c
Stop installing nose in CI.
QuLogicFeb 1, 2017
ed7d353
FIX: implement `__ne__` for `SubplotSpec`
tacaswellFeb 1, 2017
ca255dd
Normalize path case before checking for fonts.
QuLogicFeb 1, 2017
3cb2752
Fix one last old xfail call.
QuLogicFeb 1, 2017
857d846
Fix tests.py when passed explicit filenames.
QuLogicFeb 3, 2017
fe20a23
Always upload coverage on Travis.
QuLogicFeb 3, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
PrevPrevious commit
NextNext commit
Skip broken category test with NumPy < 1.8.0.
  • Loading branch information
@QuLogic
QuLogic committedFeb 2, 2017
commit30e40c68eb6cd7cf4a68cab03f43d059bbbb88aa
10 changes: 10 additions & 0 deletionslib/matplotlib/tests/test_category.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -3,6 +3,8 @@
from __future__ import (absolute_import, division, print_function,
unicode_literals)

from distutils.version import LooseVersion

import pytest
import numpy as np

Expand All@@ -12,6 +14,11 @@
import unittest


needs_new_numpy = pytest.mark.xfail(
LooseVersion(np.__version__) < LooseVersion('1.8.0'),
reason='NumPy < 1.8.0 is broken.')


class TestUnitData(object):
testdata = [("hello world", ["hello world"], [0]),
("Здравствуйте мир", ["Здравствуйте мир"], [0]),
Expand All@@ -21,12 +28,14 @@ class TestUnitData(object):

ids = ["single", "unicode", "mixed"]

@needs_new_numpy
@pytest.mark.parametrize("data, seq, locs", testdata, ids=ids)
def test_unit(self, data, seq, locs):
act = cat.UnitData(data)
assert act.seq == seq
assert act.locs == locs

@needs_new_numpy
def test_update_map(self):
data = ['a', 'd']
oseq = ['a', 'd']
Expand DownExpand Up@@ -78,6 +87,7 @@ class TestStrCategoryConverter(object):
def mock_axis(self, request):
self.cc = cat.StrCategoryConverter()

@needs_new_numpy
@pytest.mark.parametrize("data, unitmap, exp", testdata, ids=ids)
def test_convert(self, data, unitmap, exp):
MUD = MockUnitData(unitmap)
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp