Skip to content

Commit

Permalink
Test 2: Remove RData tests
Browse files Browse the repository at this point in the history
Testing Github Actions stalling on Ubuntu 20.04
  • Loading branch information
AndrewIOM committed Sep 20, 2021
1 parent 8c62df9 commit 870db59
Showing 1 changed file with 18 additions and 18 deletions.
36 changes: 18 additions & 18 deletions tests/Test.RProvider/RData.Tests.fs
Original file line number Diff line number Diff line change
Expand Up @@ -12,26 +12,26 @@ open Xunit
open System
open RProvider

type Sample = RData<"data/sample.rdata">
// type Sample = RData<"data/sample.rdata">

[<Fact>]
let ``Can read sample RData file`` () =
let sample = Sample()
let sum = sample.volcanoList |> Array.sum
Assert.Equal<_>(sum, 690907.0)
Assert.Equal<_>(int sample.volcanoMean.[0], 130)
// [<Fact>]
// let ``Can read sample RData file`` () =
// let sample = Sample()
// let sum = sample.volcanoList |> Array.sum
// Assert.Equal<_>(sum, 690907.0)
// Assert.Equal<_>(int sample.volcanoMean.[0], 130)

[<Fact>]
let ``Can save RData file and read it from a temp path`` () =
let volcanoList = [| 3.0; 1.0 |]
let volcanoMean = [| 2.0 |]
// [<Fact>]
// let ``Can save RData file and read it from a temp path`` () =
// let volcanoList = [| 3.0; 1.0 |]
// let volcanoMean = [| 2.0 |]

let temp = IO.Path.GetTempFileName() + ".rdata"
R.assign("volcanoList", volcanoList) |> ignore
R.assign("volcanoMean", volcanoMean) |> ignore
R.save(list=[ "volcanoList"; "volcanoMean" ], file=temp) |> ignore
// let temp = IO.Path.GetTempFileName() + ".rdata"
// R.assign("volcanoList", volcanoList) |> ignore
// R.assign("volcanoMean", volcanoMean) |> ignore
// R.save(list=[ "volcanoList"; "volcanoMean" ], file=temp) |> ignore

let sample = Sample(temp)
Assert.Equal<_>(sample.volcanoList |> Array.sum, 4.0)
Assert.Equal<_>(int sample.volcanoMean.[0], 2)
// let sample = Sample(temp)
// Assert.Equal<_>(sample.volcanoList |> Array.sum, 4.0)
// Assert.Equal<_>(int sample.volcanoMean.[0], 2)

0 comments on commit 870db59

Please sign in to comment.