Skip to content
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

Assertion helpers for .getvalue() #87

Open
jayvdb opened this issue Sep 11, 2019 · 1 comment
Open

Assertion helpers for .getvalue() #87

jayvdb opened this issue Sep 11, 2019 · 1 comment
Labels
maybe This may or may not be implemented
Milestone

Comments

@jayvdb
Copy link
Contributor

jayvdb commented Sep 11, 2019

Like #80 (Windows EOL vs Unix EOL) , the reason .getvalue exists is to be used in assertions. And #80 exists because it is usually important for the precision of assertions to check most of the value, but allow some implementation/temporal/etc details to be ignored.

We could leave this to an external assertion library, however there are likely some other 'easy wins', similar to EOLs, where an internal helper can provide a common need, and can be easily achieved with the stdlib, or the helpers solve our own needs.

The one that comes to mind is a regex match, or some large text match, which could be used with #11 to say "dump to the real streams if it doesnt match /this pattern/.

For implementation, this should be done after #86 , so we have an abstract class to hang the helpers onto.

@jayvdb jayvdb added the maybe This may or may not be implemented label Sep 11, 2019
@bskinn
Copy link
Owner

bskinn commented Sep 11, 2019

This is probably application-specific enough that pushing it up to stdlib won't make sense...and we'll probably want our own custom methods on it anyways.

The one that comes to mind is a regex match, or some large text match, which could be used with #11 to say "dump to the real streams if it doesnt match /this pattern/ .

This makes sense--only reproduce/push content out to the 'real' (e.g., prior to stdio-mgr) streams if it doesn't match what I expect.

@bskinn bskinn added this to the Sooner milestone Sep 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maybe This may or may not be implemented
Development

No branches or pull requests

2 participants