-
Notifications
You must be signed in to change notification settings - Fork 679
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
Chore: rstest improvements #3731
Conversation
…ning multithreaded in some platforms
Codecov Report
@@ Coverage Diff @@
## master #3731 +/- ##
=========================================
Coverage 0.17% 0.18%
=========================================
Files 302 302
Lines 285382 277126 -8256
=========================================
Hits 512 512
+ Misses 284870 276614 -8256
... and 1 file with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is great! Thanks @kantai. Just a couple comments.
mut env_factory: MemoryEnvironmentGenerator, | ||
) { | ||
let mut owned_env = env_factory.get_env(epoch); | ||
|
||
let mut placeholder_context = ContractContext::new( | ||
QualifiedContractIdentifier::transient(), | ||
ClarityVersion::Clarity2, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here and several other places in this file, there are tests where you've added test_clarity_versions
but then didn't use version
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Corrected in 7c10037. I added a warn(unused)
lint definition to the tests module, and fixed all those warnings, then removed the label again, because it interacts pretty unsatisfactorily with the workspace build (it warns on unused items when the testing
build flag is set, which generates a ton of invalid warns -- there's probably a way to fix that, but I'll save that for another time).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
There looks to be two CI issues on this PR (one of which is blocking merging):
I'll open an issue for this, but just highlighting here as well, @wileyj |
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Description
This PR makes a few improvements related to rstest usage in the codebase.
rstest
andrstest-reuse
dependencies (these dependencies were generating a future-incompatibilities warning from rustc).macro_rules!
macro. This macro includes a test function which includes a match statement. This test function and match statement will trigger a compile time error if an epoch case (in the epochs template) or if an (epoch, clarity_version) pair are unspecified in the template./tmp/
directory path rather than the rusttemp_dir
method. This fixes an issue running the tests concurrently in some environments (notably, my development machine!)Applicable issues
Additional info (benefits, drawbacks, caveats)
This PR only alters testing code.
It's currently based off
master
, but I can rebase ondevelop
as soon asmaster -> develop
merges.