Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
atlas-flavor-tagging-tools
algorithms
Umami
Commits
4b1cee08
Commit
4b1cee08
authored
Jan 19, 2022
by
Philipp Gadow
Browse files
update unit tests
parent
3ded146b
Pipeline
#3462430
passed with stages
in 9 minutes and 38 seconds
Changes
6
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
pipelines/.coverage-gitlab-ci.yaml
View file @
4b1cee08
...
...
@@ -14,6 +14,8 @@
-
unittest_tf_tools
-
unittest_train_tools
-
unittest_metrics
-
unittest_classification_tools
-
unittest_data_tools
test_coverage
:
stage
:
coverage_test_stage
...
...
umami/tests/unit/preprocessing/test_preprocess_config.yaml
→
umami/tests/unit/preprocessing/
fixtures/
test_preprocess_config.yaml
View file @
4b1cee08
File moved
umami/tests/unit/preprocessing/test_preprocess_plotting.py
View file @
4b1cee08
...
...
@@ -25,7 +25,7 @@ class PreprocessPlotting_TestCase(unittest.TestCase):
# Load test preprocessing config file from current directory
self
.
config_file
=
os
.
path
.
join
(
os
.
path
.
dirname
(
__file__
),
"test_preprocess_config.yaml"
os
.
path
.
dirname
(
__file__
),
"fixtures"
,
"test_preprocess_config.yaml"
)
self
.
config
=
upt
.
Configuration
(
self
.
config_file
)
...
...
umami/tests/unit/preprocessing/test_preprocessing_tools.py
View file @
4b1cee08
...
...
@@ -20,7 +20,7 @@ class ConfigurationTestCase(unittest.TestCase):
Set a example config file.
"""
self
.
config_file
=
os
.
path
.
join
(
os
.
path
.
dirname
(
__file__
),
"test_preprocess_config.yaml"
os
.
path
.
dirname
(
__file__
),
"fixtures"
,
"test_preprocess_config.yaml"
)
def
test_missing_key_error
(
self
):
...
...
@@ -88,7 +88,9 @@ class PrepareSamplesTestCase(unittest.TestCase):
class
c_args
:
def
__init__
(
self
)
->
None
:
self
.
sample
=
"ttbar"
self
.
config_file
=
"test_preprocess_config.yaml"
self
.
config_file
=
os
.
path
.
join
(
os
.
path
.
dirname
(
__file__
),
"fixtures"
,
"test_preprocess_config.yaml"
)
self
.
shuffle_array
=
True
def
setUp
(
self
):
...
...
umami/tests/unit/preprocessing/test_preprocessing_tools_Resampling.py
View file @
4b1cee08
...
...
@@ -107,7 +107,7 @@ class UnderSamplingTestCase(unittest.TestCase):
Create a default dataset for testing.
"""
self
.
config_file
=
os
.
path
.
join
(
os
.
path
.
dirname
(
__file__
),
"test_preprocess_config.yaml"
os
.
path
.
dirname
(
__file__
),
"fixtures"
,
"test_preprocess_config.yaml"
)
self
.
config
=
Configuration
(
self
.
config_file
)
self
.
sampling_config
=
self
.
config
.
sampling
...
...
@@ -234,7 +234,7 @@ class PDFResamplingTestCase(unittest.TestCase):
Create a default dataset for testing.
"""
self
.
config_file
=
os
.
path
.
join
(
os
.
path
.
dirname
(
__file__
),
"test_preprocess_config.yaml"
os
.
path
.
dirname
(
__file__
),
"fixtures"
,
"test_preprocess_config.yaml"
)
self
.
config
=
Configuration
(
self
.
config_file
)
sampling_config
=
self
.
config
.
sampling
...
...
@@ -348,7 +348,7 @@ class ProbabilityRatioUnderSamplingTestCase(unittest.TestCase):
Create a default dataset for testing.
"""
self
.
config_file
=
os
.
path
.
join
(
os
.
path
.
dirname
(
__file__
),
"test_preprocess_config.yaml"
os
.
path
.
dirname
(
__file__
),
"fixtures"
,
"test_preprocess_config.yaml"
)
self
.
config
=
Configuration
(
self
.
config_file
)
sampling_config
=
self
.
config
.
sampling
...
...
umami/tests/unit/preprocessing/test_preprocessing_tools_Scaling.py
View file @
4b1cee08
...
...
@@ -46,7 +46,7 @@ class ScalingTestCase(unittest.TestCase):
def
setUp
(
self
):
self
.
config_file
=
os
.
path
.
join
(
os
.
path
.
dirname
(
__file__
),
"test_preprocess_config.yaml"
os
.
path
.
dirname
(
__file__
),
"fixtures"
,
"test_preprocess_config.yaml"
)
self
.
config
=
Configuration
(
self
.
config_file
)
self
.
config
.
var_file
=
os
.
path
.
join
(
...
...
Write
Preview
Markdown
is supported
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