File tree Expand file tree Collapse file tree 6 files changed +24
-0
lines changed
Expand file tree Collapse file tree 6 files changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -34,3 +34,17 @@ mcptools_server_log <- function() {
3434mcptools_client_log <- function () {
3535 Sys.getenv(" MCPTOOLS_CLIENT_LOG" , tempfile(fileext = " .txt" ))
3636}
37+
38+ # from rstudio/reticulate
39+ is_unix <- function () {
40+ identical(.Platform $ OS.type , " unix" )
41+ }
42+
43+ is_fedora <- function () {
44+ if (is_unix() && file.exists(" /etc/os-release" )) {
45+ os_info <- readLines(" /etc/os-release" )
46+ any(grepl(" Fedora" , os_info ))
47+ } else {
48+ FALSE
49+ }
50+ }
Original file line number Diff line number Diff line change 1+ skip_if(is_fedora())
2+
13test_that(" mcp_tools works" , {
24 skip_if_not_installed(" withr" )
35 skip_if(identical(Sys.getenv(" GITHUB_PAT" ), " " ))
Original file line number Diff line number Diff line change 1+ skip_if(is_fedora())
2+
13test_that(" roundtrip mcp_server and mcp_tools (stdio)" , {
24 previous_server_processes <- names(the $ server_processes )
35
Original file line number Diff line number Diff line change 1+ skip_if(is_fedora())
2+
13test_that(" mcp_session returns early when not interactive" , {
24 local_mocked_bindings(interactive = function () FALSE )
35 expect_invisible(mcp_session())
Original file line number Diff line number Diff line change 1+ skip_if(is_fedora())
2+
13test_that(" set_server_tools sets default tools when x is NULL" , {
24 set_server_tools(NULL )
35 server_tools_names <- vapply(
Original file line number Diff line number Diff line change 1+ skip_if(is_fedora())
2+
13test_that(" jsonrpc_response works" , {
24 # jsonrpc_response returns result when provided
35 result <- jsonrpc_response(" 123" , result = " success" )
You can’t perform that action at this time.
0 commit comments