-
Notifications
You must be signed in to change notification settings - Fork 7
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
write to files #136
Labels
enhancement
New feature or request
Comments
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
<#136 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAG3BS27KWOA2ABTUKOOGZL2BYE25AVCNFSM6AAAAABSHKZEWWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIOJRG42DSNJZGM>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
The text was updated successfully, but these errors were encountered: