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

Add support for arbitrary tests / multiple datasets #2

Open
colearendt opened this issue Mar 14, 2018 · 1 comment
Open

Add support for arbitrary tests / multiple datasets #2

colearendt opened this issue Mar 14, 2018 · 1 comment
Labels

Comments

@colearendt
Copy link
Contributor

I think this adds to the complication of the tests, but I thought it would be worthwhile to allow testing things like left_join, right_join, full_join, and other multi-dataset operations. In order to do this, we may need to up the dataset count to 2.

However, the more useful feature (and with the right dataset, maybe rendering multiple datasets irrelevant) would be to allow arbitrary expressions in the YAML test. Then you just need join-able columns in your test dataset

I.e. maybe something like the following in run_test:

if (verb == "verbatim") manip <- f    # or some other rlang magic

And how it might be used...

- left_join:
    verbatim: . %>% left_join(., by=c("col1","col2"))
@colearendt
Copy link
Contributor Author

Note that at present, we use pull at the end of test strings so that the equivalent test is only on a single column. If allowing full dataset comparison, we would likely need to evaluate whether equivalent is too liberal/strict.

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

No branches or pull requests

1 participant