Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
caosdb-pylib
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue 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
caosdb
Software
caosdb-pylib
Commits
934b3767
Commit
934b3767
authored
1 year ago
by
Henrik tom Wörden
Browse files
Options
Downloads
Patches
Plain Diff
TST: adjust test due to new exception
parent
e77ad570
No related branches found
Branches containing commit
No related tags found
Tags containing commit
2 merge requests
!116
REL: begin new release cycle
,
!115
FIX: do not raise error if configuration file is missing
Pipeline
#41992
canceled
1 year ago
Stage: code_style
Stage: linting
Stage: test
Stage: deploy
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
unittests/test_configuration.py
+5
-3
5 additions, 3 deletions
unittests/test_configuration.py
with
5 additions
and
3 deletions
unittests/test_configuration.py
+
5
−
3
View file @
934b3767
...
...
@@ -22,10 +22,11 @@
# ** end header
#
import
pytest
import
linkahead
as
db
from
os
import
environ
,
getcwd
,
remove
from
os.path
import
expanduser
,
isfile
,
join
import
linkahead
as
db
import
pytest
from
pytest
import
raises
...
...
@@ -55,7 +56,8 @@ def test_config_ini_via_envvar(temp_ini_files):
environ
[
"
PYCAOSDBINI
"
]
=
"
bla bla
"
assert
environ
[
"
PYCAOSDBINI
"
]
==
"
bla bla
"
# test wrong configuration file in envvar
assert
not
expanduser
(
environ
[
"
PYCAOSDBINI
"
])
in
db
.
configuration
.
_read_config_files
()
with
pytest
.
raises
(
RuntimeError
):
db
.
configuration
.
_read_config_files
()
# test good configuration file in envvar
environ
[
"
PYCAOSDBINI
"
]
=
"
~/.pylinkahead.ini
"
assert
expanduser
(
"
~/.pylinkahead.ini
"
)
in
db
.
configuration
.
_read_config_files
()
...
...
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