Skip to content

Commit

Permalink
Add expect_error to the unit test if sig_transcripts is not either GE…
Browse files Browse the repository at this point in the history
…NCODE or ENSEMBL

Co-authored-by: Nick Eagles <[email protected]>
  • Loading branch information
HediaTnani and Nick-Eagles committed Jan 12, 2024
1 parent af15128 commit 54a62a1
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions tests/testthat/test-utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ test_that("check_tx_names throw error if annotation is not GENCODE or ENSEMBL",
rownames(altered_covComb_tx_deg) <- paste0("gene", 1:length(rownames(altered_covComb_tx_deg)))
sig_transcripts <- select_transcripts("cell_component")
expect_error(check_tx_names(rownames(altered_covComb_tx_deg), sig_transcripts, 'rownames(rse_tx)', 'sig_transcripts'), "rownames\\(rse_tx\\)' must use either all GENCODE or all ENSEMBL transcript IDs")
expect_error(check_tx_names(sig_transcripts, rownames(altered_covComb_tx_deg), 'sig_transcripts', 'rownames(rse_tx)'), "sig_transcripts' must use either all GENCODE or all ENSEMBL transcript IDs")
})

# Test for check_tx_names transcripts throw errors if annotation is not mixed GENCODE and ENSEMBL
Expand Down

0 comments on commit 54a62a1

Please sign in to comment.