Skip to content

Commit

Permalink
Fix the unit tests generating an error
Browse files Browse the repository at this point in the history
  • Loading branch information
HediaTnani committed Jan 9, 2024
1 parent 41e1e6b commit e70b5ab
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions tests/testthat/test-getDegTx.R
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,7 @@ test_that("At least one sig_transcript is in covComb_tx_deg rownames", {
sig_transcripts <- select_transcripts("cell_component")
expect_silent({
# Check if any of the sig_transcripts are in covComb_tx_deg rownames
if (!any(sig_transcripts %in% rownames(covComb_tx_deg))) {
stop("No sig_transcripts found in rownames(covComb_tx_deg)")
}
getDegTx(sig_transcripts = sig_transcripts)
})
})

Expand All @@ -48,9 +46,8 @@ test_that("No sig_transcripts are in covComb_tx_deg rownames", {
sig_transcripts <- c("gene4", "gene5", "gene6") # Example genes not in covComb_tx_deg
expect_error({
# Check if any of the sig_transcripts are in covComb_tx_deg rownames
if (!any(sig_transcripts %in% rownames(covComb_tx_deg))) {
stop("No sig_transcripts found in rownames(covComb_tx_deg)")
}
getDegTx(sig_transcripts = sig_transcripts)

}, "No sig_transcripts found in rownames(covComb_tx_deg)")
})

Expand Down

0 comments on commit e70b5ab

Please sign in to comment.