The detailed assertion output pytest is known for comes from rewriting the bytecode of assert statements at import time. pytest does this for files matching the test discovery patterns and for modules of registered plugins. A shared helper module that your tests import is not rewritten, so an assert inside it fails with a plain AssertionError and no comparison detail.
The usual symptom is a custom assertion helper that reports nothing useful precisely when it fails, sending you back to add print statements.
Call pytest.register_assert_rewrite("mypkg.testing.helpers") before that module is first imported, which in practice means at the top of the root conftest.py, since rewriting can only be applied to a module that has not yet been imported. Packages that ship test helpers do this in their own plugin entry point. An alternative is to raise with an explicit message rather than relying on rewriting, or to move the helper into conftest.py, which is always rewritten.