Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
bilby
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
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
lscsoft
bilby
Commits
71b3112b
Commit
71b3112b
authored
6 years ago
by
Moritz Huebner
Browse files
Options
Downloads
Patches
Plain Diff
Added some tests
parent
a86c8c84
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!55
Project restructuring
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
test/prior_tests.py
+12
-0
12 additions, 0 deletions
test/prior_tests.py
with
12 additions
and
0 deletions
test/prior_tests.py
+
12
−
0
View file @
71b3112b
...
@@ -24,6 +24,18 @@ class TestPriorInstantiationWithoutOptionalPriors(unittest.TestCase):
...
@@ -24,6 +24,18 @@ class TestPriorInstantiationWithoutOptionalPriors(unittest.TestCase):
def
test_class_instance
(
self
):
def
test_class_instance
(
self
):
self
.
assertIsInstance
(
self
.
prior
,
tupak
.
prior
.
Prior
)
self
.
assertIsInstance
(
self
.
prior
,
tupak
.
prior
.
Prior
)
def
test_magic_call_is_the_same_as_sampling
(
self
):
self
.
prior
=
Mock
(
return_value
=
0.5
)
self
.
assertEqual
(
self
.
prior
.
sample
(),
self
.
p
())
def
test_base_rescale_method
(
self
):
self
.
assertIsNone
(
self
.
prior
.
rescale
())
def
test_base_repr
(
self
):
self
.
prior
=
tupak
.
prior
.
Prior
(
name
=
'
test_name
'
,
latex_label
=
'
test_label
'
,
minimum
=
0
,
maximum
=
1
)
expected_string
=
"
Prior(name=
'
test_name
'
, latex_label=
'
test_label
'
, minimum=0, maximum=1)
"
self
.
assertEqual
(
expected_string
,
self
.
prior
.
__repr__
())
class
TestPriorName
(
unittest
.
TestCase
):
class
TestPriorName
(
unittest
.
TestCase
):
...
...
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