-
Notifications
You must be signed in to change notification settings - Fork 91
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wrong line numbers using assertEquals when helper method declared in seperate file #855
Comments
I've been wondering whether hiding the stack trace is that useful. I think it was done to avoid having traces from munit, but this behaviour is flaky as seen here. |
Yeah I also understand that I'm trying to do something against the grain here. If it were configurable at least that would be great. |
Ok, it looks like it would never print the stack trace and that was on purpose, fixing it in #856 Should help with your case too or at least shed more light on it |
* Spec.build method is removed. Specs are now fully declarative and the DbType is responsible for implementation. * Tests are improved and now shared between database specs insteads of duplicated. The increased coverage exposed some tangential issues which are also resolved in this MR (see below). Note: switched from munit assertEquals -> assert until fix for scalameta/munit#855 (comment) is released. Additional changes: * No longer need to handle null when using DbCodec.biMap, or implementing DbCodec.readSingle * When implementing DbCodec, new method readSingleOption must be defined * Support optional products in outer-join queries (see test OptionalProductTests)
* Spec.build method is removed. Specs are now fully declarative and the DbType is responsible for implementation. * Tests are improved and now shared between database specs insteads of duplicated. The increased coverage exposed some tangential issues which are also resolved in this MR (see below). Note: switched from munit assertEquals -> assert until fix for scalameta/munit#855 (comment) is released. Additional changes: * No longer need to handle null when using DbCodec.biMap, or implementing DbCodec.readSingle * When implementing DbCodec, new method readSingleOption must be defined * Support optional products in outer-join queries (see test OptionalProductTests)
* Spec.build method is removed. Specs are now fully declarative and the DbType is responsible for implementation. * Tests are improved and now shared between database specs insteads of duplicated. The increased coverage exposed some tangential issues which are also resolved in this MR (see below). Note: switched from munit assertEquals -> assert until fix for scalameta/munit#855 (comment) is released. Additional changes: * No longer need to handle null when using DbCodec.biMap, or implementing DbCodec.readSingle * When implementing DbCodec, new method readSingleOption must be defined * Support optional products in outer-join queries (see test OptionalProductTests) * Switched to latest scalafmt version to prevent OOM in OracleTests
* Spec.build method is removed. Specs are now fully declarative and the DbType is responsible for implementation. * Add Spec.prefix method * Change Spec.seek nullOrder, Spec.orderBy direction and nullOrder to be database Default * Tests are improved and now shared between database specs insteads of duplicated. The increased coverage exposed some tangential issues which are also resolved in this MR (see below). Note: switched from munit assertEquals -> assert until fix for scalameta/munit#855 (comment) is released. Additional changes: * No longer need to handle null when using DbCodec.biMap, or implementing DbCodec.readSingle * When implementing DbCodec, new method readSingleOption must be defined * Support optional products in outer-join queries (see test OptionalProductTests) * Switched to latest scalafmt version to prevent OOM in OracleTests * Make Frag, Query, Update, Returning into regular classes * Frag.returningKeys method which uses ResultSet.getGeneratedKeys * Make MySq insertReturning throw, since we shouldn't define 2-query repository methods.
* Spec Refactor: * Spec.build method is removed. Specs are now fully declarative and the DbType is responsible for implementation. * Add Spec.prefix method * Change Spec.seek nullOrder, Spec.orderBy direction and nullOrder to be database Default * Tests are improved and now shared between database specs insteads of duplicated. The increased coverage exposed some tangential issues which are also resolved in this MR (see below). Note: switched from munit assertEquals -> assert until fix for scalameta/munit#855 (comment) is released. Additional changes: * No longer need to handle null when using DbCodec.biMap, or implementing DbCodec.readSingle * When implementing DbCodec, new method readSingleOption must be defined * Support optional products in outer-join queries (see test OptionalProductTests) * Switched to latest scalafmt version to prevent OOM in OracleTests * Make Frag, Query, Update, Returning into regular classes * Frag.returningKeys method which uses ResultSet.getGeneratedKeys * Make MySq insertReturning throw, since we shouldn't define 2-query repository methods. * reduce duplication with shared DbCodec.readSingleOpt impl * remove unused def in MySqlDbType * fix SqlLogger error formatting * use keyColumsArr in Returning * make sure no expr duplication in sql macro * add test to ensure that embedded frag param exprs are evaluated only once
The release is running, let me know if that helps https://github.com/scalameta/munit/actions/runs/12119500567 |
When using a MUnit test inside a helper function that lives in a different file than the FunSuite subtype, the error output is very unhelpful.
I've made a minimal reproducer here: https://github.com/AugustNagro/munit-helper-bad-trace
If assertEquals printed the stacktrace (like assert() and as suggested in #782 ), that would make things much better.
The text was updated successfully, but these errors were encountered: