diff --git a/GaudiTestSuite/tests/pytest/root_io/test_reproducible_write.py b/GaudiTestSuite/tests/pytest/root_io/test_reproducible_write.py
index e2b709e529d6641cc99dc7e28730b5e5275f5177..5a40a5ac4fc611d2bf9f081e88f06ea5864808c2 100644
--- a/GaudiTestSuite/tests/pytest/root_io/test_reproducible_write.py
+++ b/GaudiTestSuite/tests/pytest/root_io/test_reproducible_write.py
@@ -1,5 +1,5 @@
 #####################################################################################
-# (c) Copyright 2024 CERN for the benefit of the LHCb and ATLAS collaborations      #
+# (c) Copyright 2024-2025 CERN for the benefit of the LHCb and ATLAS collaborations #
 #                                                                                   #
 # This software is distributed under the terms of the Apache version 2 licence,     #
 # copied verbatim in the file "LICENSE".                                            #
@@ -8,7 +8,7 @@
 # granted to it by virtue of its status as an Intergovernmental Organization        #
 # or submit itself to any jurisdiction.                                             #
 #####################################################################################
-import filecmp
+from hashlib import sha256
 
 import pytest
 from GaudiTesting import GaudiExeTest
@@ -34,4 +34,10 @@ class Test(GaudiExeTest):
 
     @pytest.mark.parametrize("name", ["ROOTIO.dst", "ROOTIO.mdst"])
     def test_output_content(self, name, cwd):
-        assert filecmp.cmp(cwd / name, cwd / "ReproducibleWrite" / name, shallow=False)
+        path_a = cwd / name
+        path_b = cwd / "ReproducibleWrite" / name
+        assert path_a.exists() and path_b.exists()
+
+        a = sha256(open(path_a, "rb").read()).hexdigest()
+        b = sha256(open(path_b, "rb").read()).hexdigest()
+        assert a == b