Giter Club home page Giter Club logo

Comments (3)

ibrahima avatar ibrahima commented on May 29, 2024

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.

mnoukhov avatar mnoukhov commented on May 29, 2024

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.

ibrahima avatar ibrahima commented on May 29, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.