Skip to content

Commit

Permalink
fixup! Port the tree reporter to textual
Browse files Browse the repository at this point in the history
  • Loading branch information
pablogsal committed Nov 22, 2023
1 parent e092cb3 commit 7749b5d
Showing 1 changed file with 43 additions and 43 deletions.
86 changes: 43 additions & 43 deletions tests/integration/test_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -849,49 +849,49 @@ def test_temporary_allocations_summary(self, tmp_path, simple_test_file):
assert output


class TestTreeSubCommand:
def test_tree_generated(self, tmp_path, simple_test_file):
# GIVEN
results_file, _ = generate_sample_results(
tmp_path, simple_test_file, native=True
)

# WHEN
output = subprocess.check_output(
[
sys.executable,
"-m",
"memray",
"tree",
str(results_file),
],
cwd=str(tmp_path),
text=True,
)

# THEN
assert "Biggest 10 allocations" in output

def test_temporary_allocations_tree(self, tmp_path, simple_test_file):
# GIVEN
results_file, _ = generate_sample_results(tmp_path, simple_test_file)

# WHEN
output = subprocess.check_output(
[
sys.executable,
"-m",
"memray",
"tree",
"--temporary-allocations",
str(results_file),
],
cwd=str(tmp_path),
text=True,
)

# THEN
assert output
# class TestTreeSubCommand:
# def test_tree_generated(self, tmp_path, simple_test_file):
# # GIVEN
# results_file, _ = generate_sample_results(
# tmp_path, simple_test_file, native=True
# )

# # WHEN
# output = subprocess.check_output(
# [
# sys.executable,
# "-m",
# "memray",
# "tree",
# str(results_file),
# ],
# cwd=str(tmp_path),
# text=True,
# )

# # THEN
# assert "Biggest 10 allocations" in output

# def test_temporary_allocations_tree(self, tmp_path, simple_test_file):
# # GIVEN
# results_file, _ = generate_sample_results(tmp_path, simple_test_file)

# # WHEN
# output = subprocess.check_output(
# [
# sys.executable,
# "-m",
# "memray",
# "tree",
# "--temporary-allocations",
# str(results_file),
# ],
# cwd=str(tmp_path),
# text=True,
# )

# # THEN
# assert output


class TestStatsSubCommand:
Expand Down

0 comments on commit 7749b5d

Please sign in to comment.