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

WIP: Pydarshan file_based sorting #954

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Test for job_stats.py
  • Loading branch information
Yanlilyu committed Aug 4, 2023
commit 0e9f79a52660db0aedd83a4d3f55a4ff3a994fb1
24 changes: 24 additions & 0 deletions darshan-util/pydarshan/darshan/tests/test_job_stats.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import argparse
from unittest import mock
from darshan.log_utils import get_log_path
from darshan.cli import job_stats
import pytest
@pytest.mark.parametrize(
"argv", [
[get_log_path("e3sm_io_heatmap_only.darshan"),
"-mSTDIO",
"-ototal_bytes",
"-n5"],
]
)
def test_job_stats(argv, capsys):
with mock.patch("sys.argv", argv):
# initialize the parser
parser = argparse.ArgumentParser(description="")
# run through setup_parser()
job_stats.setup_parser(parser=parser)
# parse the input arguments
args = parser.parse_args(argv)
job_stats.main(args=args)
captured = capsys.readouterr()
assert "3.258853" in captured.out