forked from pool/python-pytest-astropy-header
Accepting request 854212 from home:bnavigator:branches:openSUSE:Factory:Staging:N
- Fix test failures
* requires astropy >= 4 which removed astropy-helpers
* gh#/astropy/pytest-astropy-header#16
pytest-astropy-header-pr16-no-helper-version.patch
* gh#/astropy/pytest-astropy-header#29
pytest-astropy-header-pr29-nohelpers.patch
OBS-URL: https://build.opensuse.org/request/show/854212
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:pytest/python-pytest-astropy-header?expand=0&rev=9
This commit is contained in:
53
pytest-astropy-header-pr29-nohelpers.patch
Normal file
53
pytest-astropy-header-pr29-nohelpers.patch
Normal file
@@ -0,0 +1,53 @@
|
||||
From 7f282c28f68fe152e6364a4ebb11d59d126b7d82 Mon Sep 17 00:00:00 2001
|
||||
From: Pey Lian Lim <2090236+pllim@users.noreply.github.com>
|
||||
Date: Thu, 12 Nov 2020 16:55:01 -0500
|
||||
Subject: [PATCH] TST: No more helpers
|
||||
|
||||
---
|
||||
tests/test_display.py | 14 +++-----------
|
||||
1 file changed, 3 insertions(+), 11 deletions(-)
|
||||
|
||||
diff --git a/tests/test_display.py b/tests/test_display.py
|
||||
index 14fc2f5..32d9828 100644
|
||||
--- a/tests/test_display.py
|
||||
+++ b/tests/test_display.py
|
||||
@@ -1,14 +1,8 @@
|
||||
-import sys
|
||||
-import pytest
|
||||
+import builtins
|
||||
|
||||
+import pytest
|
||||
import numpy
|
||||
|
||||
-if sys.version_info[0] >= 3:
|
||||
- import builtins
|
||||
-else:
|
||||
- import __builtin__ as builtins
|
||||
-
|
||||
-
|
||||
NUMPY_VERSION = numpy.__version__
|
||||
|
||||
pytest_plugins = ['pytester']
|
||||
@@ -60,7 +54,6 @@ def pytest_configure(config):
|
||||
assert lines[4].startswith('Pandas: ')
|
||||
|
||||
|
||||
-
|
||||
def test_astropy_helpers(testdir, capsys):
|
||||
try:
|
||||
builtins._ASTROPY_SETUP_ = True
|
||||
@@ -69,13 +62,12 @@ def test_astropy_helpers(testdir, capsys):
|
||||
del builtins._ASTROPY_SETUP_
|
||||
out, err = capsys.readouterr()
|
||||
lines = extract_package_version_lines(out)
|
||||
- assert len(lines) == 6
|
||||
+ assert len(lines) == 5
|
||||
assert lines[0].startswith('Numpy: ')
|
||||
assert lines[1].startswith('Scipy: ')
|
||||
assert lines[2].startswith('Matplotlib: ')
|
||||
assert lines[3].startswith('h5py: ')
|
||||
assert lines[4].startswith('Pandas: ')
|
||||
- assert lines[5].startswith('astropy-helpers: ')
|
||||
|
||||
|
||||
@pytest.mark.parametrize('method', ['ini', 'conftest'])
|
||||
Reference in New Issue
Block a user