Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
fractalis
Manage
Activity
Members
Labels
Plan
External wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review 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
Fractalis
fractalis
Commits
22aacca7
There was a problem fetching the pipeline metadata.
Commit
22aacca7
authored
7 years ago
by
Sascha Herzinger
Browse files
Options
Downloads
Patches
Plain Diff
Fixing tests
parent
47b61cdf
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Pipeline
#
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
tests/correlation/test_correlation.py
+11
-11
11 additions, 11 deletions
tests/correlation/test_correlation.py
tests/shared/test_common.py
+1
-1
1 addition, 1 deletion
tests/shared/test_common.py
with
12 additions
and
12 deletions
tests/correlation/test_correlation.py
+
11
−
11
View file @
22aacca7
...
...
@@ -23,7 +23,7 @@ class TestCorrelation:
id_filter
=
[],
method
=
'
pearson
'
,
subsets
=
[
list
(
range
(
20
))],
annotation
s
=
[])
categorie
s
=
[])
assert
result
[
'
coef
'
]
assert
result
[
'
p_value
'
]
assert
result
[
'
slope
'
]
...
...
@@ -44,7 +44,7 @@ class TestCorrelation:
id_filter
=
list
(
range
(
10
)),
method
=
'
pearson
'
,
subsets
=
[
list
(
range
(
5
,
15
))],
annotation
s
=
[])
categorie
s
=
[])
df
=
json
.
loads
(
result
[
'
data
'
])
assert
len
(
df
)
==
5
...
...
@@ -58,13 +58,13 @@ class TestCorrelation:
id_filter
=
list
(
range
(
20
)),
method
=
'
pearson
'
,
subsets
=
[],
annotation
s
=
[])
categorie
s
=
[])
result_2
=
self
.
task
.
main
(
x
=
x
,
y
=
y
,
id_filter
=
list
(
range
(
20
)),
method
=
'
pearson
'
,
subsets
=
[
list
(
range
(
20
))],
annotation
s
=
[])
categorie
s
=
[])
assert
result_1
==
result_2
def
test_functional_4
(
self
):
...
...
@@ -78,7 +78,7 @@ class TestCorrelation:
id_filter
=
[],
method
=
'
foo
'
,
subsets
=
[
list
(
range
(
20
))],
annotation
s
=
[])
categorie
s
=
[])
def
test_functional_5
(
self
):
arr_1
=
np
.
c_
[
range
(
20
),
np
.
random
.
randint
(
0
,
100
,
size
=
(
20
,
1
))]
...
...
@@ -90,7 +90,7 @@ class TestCorrelation:
id_filter
=
[],
method
=
'
pearson
'
,
subsets
=
[
list
(
range
(
15
,
25
))],
annotation
s
=
[])
categorie
s
=
[])
df
=
json
.
loads
(
result
[
'
data
'
])
assert
len
(
df
)
==
5
...
...
@@ -105,7 +105,7 @@ class TestCorrelation:
id_filter
=
[],
method
=
'
pearson
'
,
subsets
=
[
list
(
range
(
20
))],
annotation
s
=
[])
categorie
s
=
[])
def
test_functional_7
(
self
):
arr_1
=
np
.
c_
[
range
(
10
),
np
.
random
.
randint
(
0
,
100
,
size
=
(
10
,
1
))]
...
...
@@ -118,7 +118,7 @@ class TestCorrelation:
id_filter
=
[],
method
=
'
pearson
'
,
subsets
=
[
list
(
range
(
10
,
20
))],
annotation
s
=
[])
categorie
s
=
[])
def
test_functional_8
(
self
):
arr_1
=
np
.
c_
[
range
(
10
),
np
.
random
.
randint
(
0
,
100
,
size
=
(
10
,
1
))]
...
...
@@ -130,7 +130,7 @@ class TestCorrelation:
id_filter
=
[],
method
=
'
pearson
'
,
subsets
=
[
list
(
range
(
5
,
20
))],
annotation
s
=
[])
categorie
s
=
[])
df
=
json
.
loads
(
result
[
'
data
'
])
assert
len
(
df
)
==
5
...
...
@@ -148,7 +148,7 @@ class TestCorrelation:
list
(
range
(
5
,
10
)),
list
(
range
(
10
,
20
))
],
annotation
s
=
[])
categorie
s
=
[])
assert
not
np
.
isnan
(
result
[
'
coef
'
])
assert
len
(
result
[
'
subsets
'
])
==
3
assert
np
.
isnan
(
result
[
'
subsets
'
][
0
][
'
coef
'
])
...
...
@@ -165,7 +165,7 @@ class TestCorrelation:
id_filter
=
[],
method
=
'
pearson
'
,
subsets
=
[
list
(
range
(
4
))],
annotation
s
=
[])
categorie
s
=
[])
df
=
json
.
loads
(
result
[
'
data
'
])
assert
np
.
isnan
(
result
[
'
coef
'
])
assert
len
(
df
)
==
1
...
...
This diff is collapsed.
Click to expand it.
tests/shared/test_common.py
+
1
−
1
View file @
22aacca7
...
...
@@ -26,7 +26,7 @@ class TestCommonTasks:
category_2
=
pd
.
DataFrame
([[
1
,
'
y
'
],
[
2
,
'
y
'
,
'
z
'
]],
columns
=
[
'
id
'
,
'
y
'
,
'
z
'
])
result
=
common
.
apply_categories
(
df
=
df
,
categories
=
[
category_1
,
category_2
])
assert
list
(
result
[
'
category
'
])[
0
:
2
]
==
[
'
x
&&
y
'
,
'
y
&&
z
'
]
assert
list
(
result
[
'
category
'
])[
0
:
2
]
==
[
'
x
AND
y
'
,
'
y
AND
z
'
]
assert
np
.
isnan
(
list
(
result
[
'
category
'
])[
2
])
def
test_apply_id_filter
(
self
):
...
...
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