Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
bob.extension
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository 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
bob
bob.extension
Commits
decb1a2c
Commit
decb1a2c
authored
3 years ago
by
Amir MOHAMMADI
Browse files
Options
Downloads
Patches
Plain Diff
relax dump config tests
parent
75d22afc
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!144
List available entry points in config-based click commands
Pipeline
#61363
passed
3 years ago
Stage: build
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
bob/extension/test_click_helper.py
+9
-5
9 additions, 5 deletions
bob/extension/test_click_helper.py
with
9 additions
and
5 deletions
bob/extension/test_click_helper.py
+
9
−
5
View file @
decb1a2c
...
...
@@ -191,11 +191,15 @@ def _assert_config_dump(ref, ref_date):
# open(ref, 'wt').write(open('TEST_CONF').read())
with
open
(
"
TEST_CONF
"
,
"
r
"
)
as
f
,
open
(
ref
,
"
r
"
)
as
f2
:
text
=
f
.
read
()
ref_text
=
f2
.
read
().
replace
(
ref_date
,
today
)
# remove the starting whitespace of each line so the tests are more relaxed
text
=
"
\n
"
.
join
(
line
.
lstrip
()
for
line
in
text
.
splitlines
())
ref_text
=
"
\n
"
.
join
(
line
.
lstrip
()
for
line
in
ref_text
.
splitlines
())
assert
text
==
ref_text
ref_text
=
f2
.
read
()
ref_text
=
ref_text
.
replace
(
ref_date
,
today
)
# remove the starting and final whitespace of each line so the tests are more relaxed
text
=
"
\n
"
.
join
(
line
.
strip
()
for
line
in
text
.
splitlines
())
ref_text
=
"
\n
"
.
join
(
line
.
strip
()
for
line
in
ref_text
.
splitlines
())
# replace ''' with """ so tests are more relaxed
text
=
text
.
replace
(
"'''"
,
'"""'
)
ref_text
=
ref_text
.
replace
(
"'''"
,
'"""'
)
assert
text
==
ref_text
def
test_config_dump
():
...
...
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