Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Andrei-Claudiu Roibu
BrainMapper
Commits
4b4ac4d4
Commit
4b4ac4d4
authored
Apr 15, 2020
by
Andrei-Claudiu Roibu
🖥
Browse files
fixed labels=None non iterable bug
parent
a5664ee3
Changes
1
Hide whitespace changes
Inline
Side-by-side
test/test_datautils.py
0 → 100644
View file @
4b4ac4d4
import
utils.data_utils
as
du
import
unittest
from
unittest
import
mock
class
test_directoryreader
(
unittest
.
TestCase
):
def
test_return_type
(
self
):
folder_location
=
"../well/win-biobank/projects/imaging/data/data3/subjectsAll/"
print
(
du
.
directory_reader
(
folder_location
))
self
.
assertEqual
(
type
(
du
.
directory_reader
(
folder_location
)),
list
)
def
test_return
(
self
):
folder_location
=
"../well/win-biobank/projects/imaging/data/data3/subjectsAll/"
self
.
assertIsNotNone
(
du
.
directory_reader
(
folder_location
))
def
test_return_type_element
(
self
):
folder_location
=
"../well/win-biobank/projects/imaging/data/data3/subjectsAll/"
self
.
assertEqual
(
type
(
du
.
directory_reader
(
folder_location
)[
0
]),
str
)
class
test_dataTestTrainValidationSplit
(
unittest
.
TestCase
):
def
test_functionRun
(
self
):
folder_location
=
"../well/win-biobank/projects/imaging/data/data3/subjectsAll/"
self
.
assertIsNone
(
du
.
data_test_train_validation_split
(
folder_location
,
90
,
5
))
class
test_updateShufflingFlag
(
unittest
.
TestCase
):
def
test_functionRun
(
self
):
file_name
=
"settings.ini"
self
.
assertIsNone
(
du
.
update_shuffling_flag
(
file_name
))
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment