Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
fslpy
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Michiel Cottaar
fslpy
Commits
7f082281
Commit
7f082281
authored
6 years ago
by
Paul McCarthy
Browse files
Options
Downloads
Patches
Plain Diff
testdir is no longer an option
parent
b28d6d8f
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tests/conftest.py
+4
-11
4 additions, 11 deletions
tests/conftest.py
with
4 additions
and
11 deletions
tests/conftest.py
+
4
−
11
View file @
7f082281
...
...
@@ -19,21 +19,14 @@ def pytest_addoption(parser):
action
=
'
store
'
,
default
=
50
,
help
=
'
Number of test iterations for imagewrapper
'
)
parser
.
addoption
(
'
--testdir
'
,
action
=
'
store
'
,
help
=
'
FSLeyes test data directory
'
)
parser
.
addoption
(
'
--seed
'
,
type
=
int
,
help
=
'
Seed for random number generator
'
)
@pytest.fixture
def
testdir
(
request
):
"""
FSLeyes test data directory.
"""
return
op
.
expanduser
(
request
.
config
.
getoption
(
'
--testdir
'
))
help
=
'
Seed for random number generator
'
)
@pytest.fixture
...
...
@@ -44,12 +37,12 @@ def niters(request):
@pytest.fixture
def
seed
(
request
):
seed
=
request
.
config
.
getoption
(
'
--seed
'
)
if
seed
is
None
:
seed
=
np
.
random
.
randint
(
2
**
32
)
np
.
random
.
seed
(
seed
)
random
.
seed
(
seed
)
print
(
'
Seed for random number generator: {}
'
.
format
(
seed
))
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment