Skip to content
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

feat(gnovm): add 'gno test -print-events' + cleanup machine between tests #2975

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

moul
Copy link
Member

@moul moul commented Oct 17, 2024

  • add gno test -print-events flag for unit tests.
  • add // Events: support in _filetests.gno.
  • cleanup gno.Machine between unit tests (\o/) .

Fixes #1982

@moul moul self-assigned this Oct 17, 2024
@github-actions github-actions bot added the 📦 🤖 gnovm Issues or PRs gnovm related label Oct 17, 2024
Copy link

codecov bot commented Oct 17, 2024

Codecov Report

Attention: Patch coverage is 59.42029% with 28 lines in your changes missing coverage. Please review.

Project coverage is 63.11%. Comparing base (5ef7cbf) to head (316b7a7).
Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
gnovm/tests/file.go 46.93% 23 Missing and 3 partials ⚠️
gnovm/cmd/gno/test.go 90.00% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2975      +/-   ##
==========================================
+ Coverage   63.07%   63.11%   +0.03%     
==========================================
  Files         564      564              
  Lines       79273    79337      +64     
==========================================
+ Hits        50001    50070      +69     
+ Misses      25907    25900       -7     
- Partials     3365     3367       +2     
Flag Coverage Δ
contribs/gnodev 60.62% <ø> (ø)
contribs/gnofaucet 14.82% <ø> (ø)
gno.land 67.56% <ø> (ø)
gnovm 67.30% <59.42%> (+0.06%) ⬆️
misc/genstd 79.72% <ø> (ø)
misc/logos 19.45% <ø> (ø)
tm2 62.24% <ø> (-0.02%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Signed-off-by: moul <[email protected]>
@github-actions github-actions bot added the 🧾 package/realm Tag used for new Realms or Packages. label Oct 18, 2024
@moul moul marked this pull request as ready for review October 18, 2024 15:53
@@ -33,15 +33,6 @@ func TestNewWithAddress(t *testing.T) {
}
}

func TestOwner(t *testing.T) {
Copy link
Member Author

@moul moul Oct 18, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI, this was a duplicate of TestNew, which was the first test of the file.

@moul moul mentioned this pull request Oct 18, 2024
@leohhhn
Copy link
Contributor

leohhhn commented Oct 18, 2024

There's a PR for this, although it hasn't been merged for some time.

#2071

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📦 🤖 gnovm Issues or PRs gnovm related 🧾 package/realm Tag used for new Realms or Packages.
Projects
Status: No status
Status: 📥 Inbox
Status: No status
Development

Successfully merging this pull request may close these issues.

[GnoVM] Reset machine context & realm state after each Test function
2 participants