Skip to content

Commit

Permalink
Replace test_align with for-loop
Browse files Browse the repository at this point in the history
  • Loading branch information
sergey-miryanov committed Jan 28, 2025
1 parent 6369def commit 1fa04f3
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions tests/test_cmdline.py
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,7 @@ def expect_aligned_to_sync_marker(data):
aligned_diff = abs(funcs[1]['ts'] - funcs[0]['ts'])
self.assertLessEqual(aligned_diff, 1000.0, str(data))

def test_align(extra_args):
for extra_args in [[], ["--dump_raw"]]:
with tempfile.TemporaryDirectory() as tmpdir:
res1_filename = os.path.join(tmpdir, 'res1.json')
res2_filename = os.path.join(tmpdir, 'res2.json')
Expand All @@ -414,13 +414,9 @@ def test_align(extra_args):
self.template(
[sys.executable, "-m", "viztracer", "--align_combine", res1_filename, res2_filename],
expected_output_file="result.json",
script='',
check_func=expect_aligned_to_sync_marker,
)

test_align([])
test_align(['--dump_raw'])

def test_tracer_entries(self):
self.template([sys.executable, "-m", "viztracer", "--tracer_entries", "1000", "cmdline_test.py"])
self.template([sys.executable, "-m", "viztracer", "--tracer_entries", "50", "cmdline_test.py"])
Expand Down

0 comments on commit 1fa04f3

Please sign in to comment.