Skip to content

Commit

Permalink
Update to pytest >= 5.0
Browse files Browse the repository at this point in the history
  • Loading branch information
dean0x7d committed Aug 29, 2020
1 parent 2a07f52 commit a30ed7c
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ def changelog():
package_dir={'pybinding.tests': 'tests'},
include_package_data=True,
ext_modules=[CMakeExtension('_pybinding')],
install_requires=['numpy>=1.12', 'scipy>=0.19', 'matplotlib>=2.0', 'pytest>=3.0'],
install_requires=['numpy>=1.12', 'scipy>=0.19', 'matplotlib>=2.0', 'pytest>=5.0'],
zip_safe=False,
cmdclass=dict(build_ext=CMakeBuild)
)
4 changes: 2 additions & 2 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
from .utils.fuzzy_equal import FuzzyEqual


def pytest_namespace():
return {'fuzzy_equal': FuzzyEqual}
def pytest_configure():
pytest.fuzzy_equal = FuzzyEqual


def pytest_addoption(parser):
Expand Down
2 changes: 1 addition & 1 deletion tests/local.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
;config for pb.tests() function only - not to be used with external py.test runs
[pytest]
[tool:pytest]
addopts = --doctest-modules --readonly
minversion = 3.0
filterwarnings = ignore::ImportWarning
1 change: 0 additions & 1 deletion tests/test_leads.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ def contains(x, y, _):
return pb.Model(graphene.monolayer(), ring(3, 5))


@pytest.fixture
def square_model(width=2, height=3):
def square_lattice(d=1, t=1):
lat = pb.Lattice(a1=[d, 0], a2=[0, d])
Expand Down

0 comments on commit a30ed7c

Please sign in to comment.