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
a46d2cd1
There was a problem fetching the pipeline metadata.
Commit
a46d2cd1
authored
8 years ago
by
Sascha Herzinger
Browse files
Options
Downloads
Patches
Plain Diff
fixing tests
parent
9e30085b
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
.gitlab-ci.yml
+0
-1
0 additions, 1 deletion
.gitlab-ci.yml
tests/test_config.py
+5
-7
5 additions, 7 deletions
tests/test_config.py
with
5 additions
and
8 deletions
.gitlab-ci.yml
+
0
−
1
View file @
a46d2cd1
...
...
@@ -2,7 +2,6 @@ image: python:3
before_script
:
-
pip install -e .
-
pip install unittest
test
:
script
:
...
...
This diff is collapsed.
Click to expand it.
tests/test_config.py
+
5
−
7
View file @
a46d2cd1
import
os
import
fractalis
from
importlib
import
reload
from
test.support
import
EnvironmentVarGuard
class
TestConfig
:
env_var_guard
=
EnvironmentVarGuard
()
def
test_config_when_test_mode
(
self
):
self
.
env_var_guard
.
set
(
'
FRACTALIS_MODE
'
,
'
testing
'
)
os
.
environ
[
'
FRACTALIS_MODE
'
]
=
'
testing
'
reload
(
fractalis
)
assert
not
fractalis
.
app
.
config
[
'
DEBUG
'
]
assert
fractalis
.
app
.
config
[
'
TESTING
'
]
def
test_config_when_development_mode
(
self
):
self
.
env_var_guard
.
set
(
'
FRACTALIS_MODE
'
,
'
development
'
)
os
.
environ
[
'
FRACTALIS_MODE
'
]
=
'
development
'
reload
(
fractalis
)
assert
fractalis
.
app
.
config
[
'
DEBUG
'
]
assert
not
fractalis
.
app
.
config
[
'
TESTING
'
]
def
test_config_when_production_mode
(
self
):
self
.
env_var_guard
.
set
(
'
FRACTALIS_MODE
'
,
'
production
'
)
os
.
environ
[
'
FRACTALIS_MODE
'
]
=
'
production
'
reload
(
fractalis
)
assert
not
fractalis
.
app
.
config
[
'
DEBUG
'
]
assert
not
fractalis
.
app
.
config
[
'
TESTING
'
]
def
test_config_when_default
(
self
):
s
el
f
.
env
_var_guard
.
unset
(
'
FRACTALIS_MODE
'
)
d
el
os
.
env
iron
[
'
FRACTALIS_MODE
'
]
reload
(
fractalis
)
assert
not
fractalis
.
app
.
config
[
'
DEBUG
'
]
assert
not
fractalis
.
app
.
config
[
'
TESTING
'
]
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