Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update csv_stack test for pandas >= 2.1 #653

Merged
merged 1 commit into from
Jan 24, 2024
Merged
Changes from all commits
Commits
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
12 changes: 2 additions & 10 deletions tests/test_csv_stack.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
import os
import re
import subprocess
import sys
from pathlib import Path

import pandas as pd
Expand Down Expand Up @@ -210,10 +209,6 @@ def test_commandlinetool(tmp_path, mocker):
assert 2 in stacked["REGION"].astype(int).values


@pytest.mark.skipif(
sys.version_info < (3, 7),
reason="Requires Python 3.7 or higher (subprocess-capture-output)",
)
@pytest.mark.parametrize("verbose", [False, True])
def test_csv_stack_verbose(tmp_path, verbose):
"""Test that --verbose gives INFO logging to stdout"""
Expand All @@ -233,10 +228,6 @@ def test_csv_stack_verbose(tmp_path, verbose):
assert "INFO:" not in output


@pytest.mark.skipif(
sys.version_info < (3, 7),
reason="Requires Python 3.7 or higher (subprocess-capture-output)",
)
def test_csv_stack_stdout(tmp_path):
"""Test that csv output can be dumped to stdout"""
os.chdir(tmp_path)
Expand All @@ -245,7 +236,8 @@ def test_csv_stack_stdout(tmp_path):
result = subprocess.run(commands, check=True, capture_output=True)
output = result.stdout.decode()
assert "WELL" in output
assert "A2,2015" in output
assert "A2" in output
assert "2015" in output


@pytest.mark.integration
Expand Down