From 8ec1600a748a4599b74d535779af1e6dd580927a Mon Sep 17 00:00:00 2001 From: Earlopain <14981592+Earlopain@users.noreply.github.com> Date: Wed, 26 Nov 2025 11:14:31 +0100 Subject: [PATCH] Speed up snapshots test Using pp does extra work that doesn't seem to do much of anything. This brings `SnapshotsTest` runtime down to 8 from 10 seconds for me Creating inspect output still dominates the total runtime --- test/prism/snapshots_test.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/prism/snapshots_test.rb b/test/prism/snapshots_test.rb index 20cdf44d90..58627e3668 100644 --- a/test/prism/snapshots_test.rb +++ b/test/prism/snapshots_test.rb @@ -48,7 +48,7 @@ def assert_snapshot(fixture, version) result = Prism.parse(source, filepath: fixture.path, version: version) assert result.success? - printed = PP.pp(result.value, +"", 79) + printed = result.value.inspect snapshot = fixture.snapshot_path if File.exist?(snapshot)