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

PropEr should use printer. #246

Open
kostis opened this issue Apr 23, 2020 · 2 comments
Open

PropEr should use printer. #246

kostis opened this issue Apr 23, 2020 · 2 comments

Comments

@kostis
Copy link
Collaborator

kostis commented Apr 23, 2020

I got some strange fffs printed out. It turns out, there are several cases where PropEr(TM) is not using the printer but straight io:format (&co). I'd rather have a consistent noise than inconsistent "silence", and for the users to spend time trying to figure out what in their code is printing some random letters, like I did 😉

So I think that everything in PropEr should use printer.

Originally posted by @x4lldux in #232 (comment)

@kostis
Copy link
Collaborator Author

kostis commented Apr 24, 2020

While cleaning and testing the on_output code of PropEr, I've noticed similar things (direct uses of io:format and friends) but never the "f" prints. These happen only when doing parallel stateful testing at a specific place in proper_statem's code, and from some cursory glance in that code they may be there to indicate some special/unusual case which may require user attention.

It may be worthwhile to have some test case that shows these fffs so that we see whether there is some other code refactoring that is needed in proper_statem instead of just io:format -> print.

@x4lldux
Copy link
Contributor

x4lldux commented Apr 25, 2020

@kostis yeah, those "other things" I was working on (mentioned in the original post) was my work stuff that uses parallel statem testing. Those "f"s are not important. They were just a thing which debugging led me to discover that PropEr uses io:format in some cases, so I wouldn't go as far as writing a tests to force "f"s.

About the solution. If I'm not mistaken, all those io:formats are used in generators where on_output option is not available, so replacing them will require either a gen_server or some other way of handling a global config (maybe a parameter could be used here). Though, you mentioned something about ongoing work on parallelization of PropEr which might collide together.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants