Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
pycalibration
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Model registry
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
calibration
pycalibration
Commits
1312b0d5
Commit
1312b0d5
authored
3 years ago
by
Thomas Kluyver
Browse files
Options
Downloads
Patches
Plain Diff
Don't try to connect to server on import
parent
bc7aea0d
No related branches found
No related tags found
1 merge request
!504
Resolve "Skip ZMQ tests if zmq connection for calibration DB not available"
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tests/conftest.py
+3
-6
3 additions, 6 deletions
tests/conftest.py
with
3 additions
and
6 deletions
tests/conftest.py
+
3
−
6
View file @
1312b0d5
import
socket
from
functools
import
lru_cache
from
pathlib
import
Path
import
pytest
...
...
@@ -32,6 +33,7 @@ def pytest_configure(config):
)
@lru_cache
()
def
server_reachable
(
server
:
str
=
"
max-exfl017
"
):
reachable
=
True
...
...
@@ -43,16 +45,11 @@ def server_reachable(server: str = "max-exfl017"):
return
reachable
SERVER_REACHABLE
=
server_reachable
()
def
pytest_runtest_setup
(
item
):
if
list
(
item
.
iter_markers
(
name
=
"
requires_gpfs
"
))
and
(
not
Path
(
"
/gpfs
"
).
is_dir
()
or
item
.
config
.
getoption
(
"
--no-gpfs
"
)
):
pytest
.
skip
(
"
gpfs not available
"
)
if
list
(
item
.
iter_markers
(
name
=
"
requires_caldb
"
))
and
(
not
SERVER_REACHABLE
or
item
.
config
.
getoption
(
"
--no-caldb
"
)
):
if
list
(
item
.
iter_markers
(
name
=
"
requires_caldb
"
))
and
not
server_reachable
():
pytest
.
skip
(
"
caldb not available
"
)
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