Skip to content

Commit ba91db7

Browse files
committed
introduce default arguments for IO generation in tests (e.g. for neuroshare dll reference)
1 parent 7345142 commit ba91db7

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

neo/test/iotest/common_io_test.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,9 @@ class BaseTestIO:
8181
entities_to_test = [] # list of files to test compliances
8282
entities_to_download = [] # when files are at gin
8383

84+
default_arguments = []
85+
default_keyword_arguments = {}
86+
8487
# when reading then writing produces files with identical hashes
8588
hash_conserved_when_write_read = False
8689
# when writing then reading creates an identical neo object
@@ -529,6 +532,10 @@ def test__handle_pathlib_filename(self):
529532
pathlib_filename = pathlib.Path(filename)
530533

531534
if self.ioclass.mode == 'file':
532-
self.ioclass(filename=pathlib_filename)
535+
self.ioclass(filename=pathlib_filename,
536+
*self.default_arguments,
537+
**self.default_keyword_arguments)
533538
elif self.ioclass.mode == 'dir':
534-
self.ioclass(dirname=pathlib_filename)
539+
self.ioclass(dirname=pathlib_filename,
540+
*self.default_arguments,
541+
**self.default_keyword_arguments)

0 commit comments

Comments
 (0)