Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
asapo
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Contributor 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
asapo
asapo
Merge requests
!265
Fix callback
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Fix callback
fix_callback
into
develop
Overview
5
Commits
5
Pipelines
5
Changes
6
2 unresolved threads
Hide all comments
Merged
Mikhail Karnevskiy
requested to merge
fix_callback
into
develop
7 months ago
Overview
5
Commits
5
Pipelines
5
Changes
4
2 unresolved threads
Hide all comments
Expand
@marc-olivier.andrez
This MR fixes the issue:
#11 (closed)
Merge request reports
Compare
version 3
version 4
23f55ba5
7 months ago
version 3
190775d2
7 months ago
version 2
3525b892
7 months ago
version 1
857ac4b8
7 months ago
develop (base)
and
latest version
latest version
7d8bd3f1
5 commits,
7 months ago
version 4
23f55ba5
4 commits,
7 months ago
version 3
190775d2
3 commits,
7 months ago
version 2
3525b892
3 commits,
7 months ago
version 1
857ac4b8
2 commits,
7 months ago
Show latest version
4 files
+
47
−
125
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
4
Search (e.g. *.vue) (Ctrl+P)
tests/automatic/pytests/conftest.py
+
37
−
0
Options
# conftest.py
import
pytest
import
logging
import
os
from
pathlib
import
Path
import
sys
if
build_dir_env
:
=
os
.
environ
.
get
(
"
BUILD_DIR
"
):
build_dir
=
Path
(
build_dir_env
)
assert
build_dir
.
exists
()
else
:
build_dir
=
Path
()
sys
.
path
.
insert
(
0
,
str
(
build_dir
/
"
producer/api/python/
"
))
sys
.
path
.
insert
(
0
,
str
(
build_dir
/
"
consumer/api/python/
"
))
import
asapo_producer
import
asapo_consumer
log
=
logging
.
getLogger
(
__name__
)
@@ -25,3 +41,24 @@ def pytest_configure(config):
@pytest.fixture
def
asapo_config
(
request
):
return
request
.
config
@pytest.fixture
def
producer
(
asapo_config
):
return
asapo_producer
.
create_producer
(
asapo_config
.
host
,
'
processed
'
,
asapo_config
.
beamtime
,
"
auto
"
,
asapo_config
.
data_source
,
asapo_config
.
token
,
asapo_config
.
n_threads
,
asapo_config
.
timeout
)
@pytest.fixture
def
consumer
(
asapo_config
):
return
asapo_consumer
.
create_consumer
(
asapo_config
.
host
,
"
auto
"
,
False
,
asapo_config
.
beamtime
,
asapo_config
.
data_source
,
asapo_config
.
token
,
timeout_ms
=
100
)
@pytest.fixture
(
autouse
=
True
)
def
cleanup_db
(
asapo_config
):
log
.
info
(
f
"
Run test for consumer
{
asapo_consumer
.
__version__
}
and producer
{
asapo_producer
.
__version__
}
"
)
os
.
makedirs
(
asapo_config
.
data_path
,
exist_ok
=
True
)
yield
None
Loading