Open lukesg08 opened 4 days ago
I don't think there's any easy access to any mock files the student has written to, as to even get write functionality I had to remock the open function to allow writing:
mocked.create_open_function(MAIN_REPORT, forbidden_names=re.compile(r"(^[./])|(\.py$)"),
forbidden_modes=re.compile(r"X"))
but perhaps there's an easier way...also, I don' t think this actually works
No I think you're right. I don't think it's really implemented. My intuition is that it wouldn't be hard to make it easy, but I've just never done it - my curriculum happens to not have file writing. But I'm very interested in adding this support. I need to take a week or two and spend time on Pedal, before my sabbatical evaporates. Right now I'm traveling, but we'll see on the other side of break! Keep thinking and talking about this issue :)
On Thu, Nov 21, 2024, 11:45 AM lukesg08 @.***> wrote:
nvm, I messed up a line in my code, but I don't think there's any easy access to any mock files the student has written to, as to even get write functionality I had to remock the open function to allow writing:
mocked.create_open_function(MAIN_REPORT, forbidden_names=re.compile(r"(^[./])|(.py$)"), forbidden_modes=re.compile(r"X"))
but perhaps there's an easier way...
— Reply to this email directly, view it on GitHub https://github.com/pedal-edu/pedal/issues/136#issuecomment-2491749593, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAG3BS27KWOA2ABTUKOOGZL2BYE25AVCNFSM6AAAAABSHKZEWWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIOJRG42DSNJZGM . You are receiving this because you are subscribed to this thread.Message ID: @.***>
Support for writing to file would be great. Right now, even if I try to mock the open function and/or change _OPEN_FORBIDDEN_MODES, I don't seem to be able to allow file writes in Pedal.