Skip to content

Commit 9f7d6c6

Browse files
committed
additional tests when using a property of neuron as subdir
1 parent ea189ee commit 9f7d6c6

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

tests/testthat/test-neuron-io.R

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -822,6 +822,14 @@ test_that("write.neurons works",{
822822
files_found=dir(td,recursive=T,pattern='am$')
823823
expect_true(all(basename(written_files)%in%basename(files_found)))
824824

825+
expect_is(written_files<-write.neurons(Cell07PNs, dir=td, subdir="CellType",
826+
INDICES=neurons_to_write,ext='.am3d',
827+
format='hxskel'),'character')
828+
files_found=dir(td,recursive=T,pattern='am3d$')
829+
expect_true(all(basename(written_files)%in%basename(files_found)))
830+
expect_equal(with(Cell07PNs[neurons_to_write],as.character(Glomerulus)),
831+
basename(dirname(written_files)))
832+
825833
expect_is(written_files<-write.neurons(Cell07PNs, dir=td,
826834
INDICES=neurons_to_write,
827835
subdir=file.path(Glomerulus),format='swc'),'character')

0 commit comments

Comments
 (0)