Skip to content

Simpler integration of kernel tests into R test framework - #375

Merged
flying-sheep merged 3 commits into
masterfrom
testthat2
Jul 5, 2016
Merged

Simpler integration of kernel tests into R test framework#375
flying-sheep merged 3 commits into
masterfrom
testthat2

Conversation

@takluyver

Copy link
Copy Markdown
Member

See discussion on #371

@flying-sheep

flying-sheep commented Jul 5, 2016

Copy link
Copy Markdown
Member

looks good to me!

PS: i’ll probably do another PR soon that also integrates the testing systems, but does so in a smarter way. i’ve crated a JSON TestRunner i’ll publish as pip package, and we can consume its output using like 5 lines via a loop and jsonlite::stream_in

@flying-sheep
flying-sheep merged commit 9d95281 into master Jul 5, 2016
@flying-sheep
flying-sheep deleted the testthat2 branch July 5, 2016 15:23
@flying-sheep

Copy link
Copy Markdown
Member

maybe you could remove the DeprecationWarnings in another commit. you can use -W ignore::DeprecationWarning

@takluyver

Copy link
Copy Markdown
Member Author

i’ve crated a JSON TestRunner...

I still don't see any advantage to this extra complexity. Complexity in a package you've created is still complexity you have to maintain. Let's keep it simple, at least until we identify a clear need for something more.

maybe you could remove the DeprecationWarnings in another commit...

Done. I'm not sure if it will work or not, as DeprecationWarnings are ignored by default, so something in the test machinery must be turning them on.

@@ -0,0 +1,6 @@
context('kernel')

status <- system2('python3', 'test_ir.py', wait=TRUE)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It will be interesting what will happen if we submit that to CRAN: on my system, there is no python3 and in RStudio (or my r package install script), I don't have the kernel testing tool installed, so this tests will basically always fail.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess we'll just remove this file from the tarball we submit to CRAN, in that case :-(

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

...or use a series of system commands to install Anaconda ;-). But it may well block network access.

@flying-sheep flying-sheep Jul 5, 2016

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we add python3 and jupyter_kernel_test to SystemRequirements with an explanation that they’re needed for tests.

see e.g. nbconvertR

@takluyver

Copy link
Copy Markdown
Member Author

Suppressing the DeprecationWarnings does appear to have worked :-)

@flying-sheep

flying-sheep commented Jul 5, 2016

Copy link
Copy Markdown
Member

as DeprecationWarnings are ignored by default

they are in python, but they aren’t in tests. (i.e. python per default installs a warning filter, which is removed during unit tests)

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

Successfully merging this pull request may close these issues.

3 participants