-
-
Notifications
You must be signed in to change notification settings - Fork 424
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
Allow mockable/predictable now() #754
Comments
What about a patcher what will replace now with date function calls? |
So yes something like that would do what I want. What about an option like
|
Make sense. I will add a helper. |
If you agree this is a good idea I can open a PR for your approval.
…On Tue, Feb 18, 2025 at 3:07 AM Anton Medvedev ***@***.***> wrote:
Make sense. I will add a helper.
—
Reply to this email directly, view it on GitHub
<#754 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AARSZC2WDT7M2N4LDZRSDK32QLS3VAVCNFSM6AAAAABXHXEB52VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMNRUHA4DCOBXGQ>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
[image: antonmedv]*antonmedv* left a comment (expr-lang/expr#754)
<#754 (comment)>
Make sense. I will add a helper.
—
Reply to this email directly, view it on GitHub
<#754 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AARSZC2WDT7M2N4LDZRSDK32QLS3VAVCNFSM6AAAAABXHXEB52VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMNRUHA4DCOBXGQ>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Sure! Please take a look at already existing patchers: https://github.com/expr-lang/expr/tree/master/patcher and follow similar semantic with naming and etc. |
Its hard to test out programs that rely on time for example:
Would it be possible to allow a testing option for
now()
to give a predictable/settable time?The text was updated successfully, but these errors were encountered: