forked from pool/python-pytest-astropy-header
54 lines
1.4 KiB
Diff
54 lines
1.4 KiB
Diff
|
|
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'])
|