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

Dashr test support #827

Merged
merged 10 commits into from
Jul 22, 2019
Merged

Dashr test support #827

merged 10 commits into from
Jul 22, 2019

Conversation

byronz
Copy link
Contributor

@byronz byronz commented Jul 19, 2019

This fixes #826

the app as string sample

app = '''
library(dash)
library(dashHtmlComponents)
app <- Dash$new()

app$layout(htmlDiv(list(htmlDiv(id='test',children='hello test'))))
app$run_server()
'''

def test_r001_r_with_string(dashr):
    dashr.start_server(app)

the filepath version

def test_r002_r_with_path(dashr):
    dashr.start_server('/Users/byron/code/demo.R')

@byronz byronz requested a review from alexcjohnson as a code owner July 19, 2019 02:44
@byronz byronz requested a review from rpkyle July 19, 2019 02:45
@byronz byronz requested a review from Marc-Andre-Rivet as a code owner July 19, 2019 03:22
@byronz
Copy link
Contributor Author

byronz commented Jul 22, 2019

@rpkyle @Marc-Andre-Rivet I need a review on this

Copy link
Contributor

@rpkyle rpkyle left a comment

Choose a reason for hiding this comment

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

💃 LGTM!

@byronz byronz merged commit 902488a into master Jul 22, 2019
@byronz byronz deleted the dashr-test-support branch July 22, 2019 20:58
else os.path.join(
(os.getenv("TEMP"), "app_{}.R".format(uuid.uuid4().hex))
)
)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Seems like this will work, but it doesn't remove the file afterward, does it? Would there have been a way to do this with tmpdir? Not sure how to go about using one fixture from within the definition of another, but it feels like all the edge cases and cleanup have already been sorted out there.

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.

[Feature Request] - add integration support for dashR
3 participants