By default, the useful assertion message rewrite is used by pytest for test modules only. Since another module is imported with shared functionality, ensure it has pytest's assertion message rewriting enabled to obtain more debug information in case it fails.