Comments (3)
Hmm, so I guess this was not actually completely true, because we are setting result.buffer over here: https://github.com/gradescope/gradescope-utils/blob/master/gradescope_utils/autograder_utils/json_test_runner.py#L156 (this is the same thing the built in TextTestRunner does: https://github.com/python/cpython/blob/master/Lib/unittest/runner.py#L156)
I think if it seemed like buffer
was not being respected, perhaps it was because you were not writing the test results directly to a file because the example was not doing that? I think if you incorporate this change it should actually work as expected: gradescope/autograder_samples#25
Given the above, I am not sure if #14 is still necessary. I kind of see the need, but I think it makes more sense to add a new option with a different name, but it also seems like you might be able to achieve what you want via the above changes.
from gradescope-utils.
Oh sorry, I realize that my updated comments were only in the PR not here.
Yes, buffer is indeed respected but just wasn't feasible with the stdout to json that was being done in run_autograder
.
The change you've made by writing the stream to a file is actually preferable, though. I just assumed (incorrectly) that you needed to use stdout for some reason. I've updated my own template code (https://github.com/mnoukhov/gradescope-autograder-template) to write to file and this simplifies things! Thanks.
from gradescope-utils.
Ah yeah, the only reason it was writign to stdout is because it was easier to run locally that way. But otherwise writing to a file directly is just a safer way to do it.
from gradescope-utils.
Related Issues (16)
- Setting a default visibility HOT 1
- Support Python 3.4's subTest feature HOT 2
- Allow for local testing HOT 6
- Visibility decorator fails to add the visibility attribute in results.json HOT 2
- Error, not able to implement @partial_credit decorator HOT 3
- Error no such file or directory HOT 1
- Help prevent reverse engineering of tests HOT 3
- Better Error Messages (easy version)
- Human-readable name of test case does not appear in results.json HOT 1
- Support for `unittest` subtests HOT 1
- Setting buffer to False in JSONTestRunner throws an error HOT 1
- Add a License HOT 2
- Leaderboard value in in results.json
- Score is displayed even if weight is None HOT 1
- Raising error in unittest's setUpClass causes autograder breaking exception
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 gradescope-utils.