Comments (5)
I've added a test case in #1879. It doesn't run in CI at all, but should come in handy to keep everything tidy manually. (It discovered three or four oversights already.)
I'd say it doesn't make sense to try to push it further before we approach the long-term goal of #1721.
from rust.
Since I know this one is my fault, I'm willing to help out! Haha.
Should be fairly straight-forward, though, from what I see. Most all of the code you would need is already in rust-tooling/generate
so you could just read the file to string and see if it equals the result of generate_tests()
. generate
would just need to be added as a dependency to ci-tests
.
Let me know!
from rust.
Actually I take that last part back now that I look at it more. No sense in compiling the entire crate just for 1-2 function(s). Copy + paste would be better but if anything changes with generate_tests()
or filters get added down the line (like mentioned in CONTRIBUTING.md
), that would cause an issue.
Maybe we could move those functions to rust-tooling/utils
instead?
from rust.
Maybe that was the reason I didn't add a test like that in the first place when I wrote the generator. However we slice and dice the crates, test generation is always going to compile tera
, which does take a while.
A few considerations that come to mind right now:
- We could not run the test in CI on PRs to save time (only run in CI when pushing to
main
) - not run in CI at all but provide the test for local convenience.
- just have a bit slower CI. we're only taking about 1-2 minutes difference I'd guess.
With regards to you taking over the work, I'm not sure you'd have a great experience. There's a good chance that a bunch of the test templates are actually broken right now. The problem is that I'm not completely happy with how the Rust generator interacts with tera templates and json from upstream... one part of the chain always ends up more complicated and ugly than I would like. A good solution here might involve changing how the generator works to some extent and refactoring many existing tera templates.
Apologies, I opened the issue as a sort of note to myself, it was not yet thought through 100%.
from rust.
That makes sense. It does look a little tricky from the code base.
Maybe do something half-way until you have to push to main
? Like pull the function names, and check that they are all present. There will still have to be a more concrete test that compares the parsed tera
later, but at least you'd avoid more overhead on most PRs.
I may look around a little bit more and see if I notice anything else, though. I agree it's definitely something that needs to be added.
from rust.
Related Issues (20)
- Question/Possible documentation issue: How to enable features? HOT 2
- Remove test_ prefix from test functions HOT 1
- Test in CI that we're in sync with problem-specifications HOT 2
- Simply linked list test error HOT 1
- Pin test runner to a specific version HOT 1
- Document / reconsider `topics` field in track config HOT 1
- Improve example solution testing scripts
- CamelCase test unintentionally removed from acronym exercise HOT 2
- Building a training set of tags for rust HOT 25
- Tests fail with no output HOT 16
- Tests don't pass when sending Cargo.toml with optional dependency HOT 1
- Remove all util functions from test files HOT 6
- Test in CI that stubs don't generate clippy warnings HOT 1
- Move more CI tests to rust tooling
- Concepts for this track are not displayed HOT 1
- word-count: change interface from u32 to usize
- test type_override fails even when correct solution is made in macros lesson HOT 1
- Performance issue about the Isogram problem approach HOT 1
- One of two-bucket's test case is wrong HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rust.