Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
soitool
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
Container Registry
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
bachelor-paa-bittet
soitool
Commits
ecda6ebe
Commit
ecda6ebe
authored
4 years ago
by
Thomas Holene Løkkeborg
Browse files
Options
Downloads
Patches
Plain Diff
#70 test for plassering av vedleggsmoduler
parent
f2d79a6e
No related branches found
No related tags found
1 merge request
!65
#70 Støtte for vedlegg i InlineEditableSOIView & i soi.py
Pipeline
#80842
passed
4 years ago
Stage: lint
Stage: test
Stage: deploy
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
soitool/inline_editable_soi_view.py
+1
-1
1 addition, 1 deletion
soitool/inline_editable_soi_view.py
test/test_soi.py
+25
-0
25 additions, 0 deletions
test/test_soi.py
with
26 additions
and
1 deletion
soitool/inline_editable_soi_view.py
+
1
−
1
View file @
ecda6ebe
...
...
@@ -16,7 +16,7 @@ from soitool.soi import ModuleLargerThanBinError
from
soitool.dialog_wrappers
import
exec_warning_dialog
from
soitool.serialize_export_import_soi
import
generate_soi_filename
#
h
ow attachment pages should be numbered. The first page should be numbered
#
H
ow attachment pages should be numbered. The first page should be numbered
# by the value of ATTACHMENT_NUMBERING_SCHEME[0], the second page
# ATTACHMENT_NUMBERING_SCHEME[1], and so on.
ATTACHMENT_NUMBERING_SCHEME
=
list
(
string
.
ascii_uppercase
)
...
...
This diff is collapsed.
Click to expand it.
test/test_soi.py
+
25
−
0
View file @
ecda6ebe
...
...
@@ -414,6 +414,31 @@ class TestSOI(unittest.TestCase):
lambda
:
self
.
soi
.
update_properties
(
invalid_key
=
"
garbage
"
),
)
def
test_reorganize_attachments
(
self
):
"""
Test that calling reorganize properly reorganized attachments.
Attachments should appear on their own pages, starting after the last
non-attachment page. The attachments should be placed at the top-left
corner.
"""
self
.
soi
.
reorganize
()
# Modules of SOI from self.setUp will all be placed on first page, so
# expect the three attachment modules also from self.setUp on pages
# 2,3,4
self
.
assertEqual
(
self
.
soi
.
attachments
[
0
][
"
meta
"
],
{
"
x
"
:
0
,
"
y
"
:
0
,
"
page
"
:
2
,
"
name
"
:
"
tall_module
"
},
)
self
.
assertEqual
(
self
.
soi
.
attachments
[
1
][
"
meta
"
],
{
"
x
"
:
0
,
"
y
"
:
0
,
"
page
"
:
3
,
"
name
"
:
"
wide_module
"
},
)
self
.
assertEqual
(
self
.
soi
.
attachments
[
2
][
"
meta
"
],
{
"
x
"
:
0
,
"
y
"
:
0
,
"
page
"
:
4
,
"
name
"
:
"
big_module
"
},
)
def
deep_copy_of_modules_list
(
modules
,
widget_cloner
):
"""
Get deep copy of modules list. Works for both modules and attachments.
...
...
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