Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
I
Init Elements
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
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
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
Arkindex
Workers
Init Elements
Merge requests
!2
Port init elements code
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Port init elements code
init-element-worker
into
master
Overview
29
Commits
10
Pipelines
9
Changes
8
All threads resolved!
Hide all comments
Merged
Manon Blanco
requested to merge
init-element-worker
into
master
1 year ago
Overview
29
Commits
10
Pipelines
9
Changes
5
All threads resolved!
Hide all comments
Expand
Closes
#2 (closed)
0
0
Merge request reports
Compare
version 4
version 8
c4d7e60d
1 year ago
version 7
e98f2dd6
1 year ago
version 6
d1de3d77
1 year ago
version 5
0d2722c7
1 year ago
version 4
13d93830
1 year ago
version 3
42fb504b
1 year ago
version 2
c01c20e9
1 year ago
version 1
8dd86ac9
1 year ago
master (base)
and
version 6
latest version
44e0ea44
10 commits,
1 year ago
version 8
c4d7e60d
9 commits,
1 year ago
version 7
e98f2dd6
8 commits,
1 year ago
version 6
d1de3d77
7 commits,
1 year ago
version 5
0d2722c7
6 commits,
1 year ago
version 4
13d93830
5 commits,
1 year ago
version 3
42fb504b
4 commits,
1 year ago
version 2
c01c20e9
3 commits,
1 year ago
version 1
8dd86ac9
2 commits,
1 year ago
Show latest version
5 files
+
319
−
225
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
5
Search (e.g. *.vue) (Ctrl+P)
tests/__init__.py
0 → 100644
+
31
−
0
Options
import
json
import
sqlite3
from
pathlib
import
Path
from
arkindex_worker.cache
import
SQL_VERSION
def
check_json
(
json_path
:
Path
,
elements
:
list
)
->
None
:
assert
json_path
.
is_file
()
assert
json
.
loads
(
json_path
.
read_text
())
==
elements
def
check_db
(
db_path
:
Path
,
elements
:
list
,
images
:
list
)
->
None
:
assert
db_path
.
is_file
()
db
=
sqlite3
.
connect
(
str
(
db_path
))
db
.
row_factory
=
sqlite3
.
Row
assert
list
(
map
(
dict
,
db
.
execute
(
"
select * from version
"
).
fetchall
()))
==
[
{
"
version
"
:
SQL_VERSION
}
]
assert
(
list
(
map
(
dict
,
db
.
execute
(
"
select * from elements order by id
"
).
fetchall
()))
==
elements
)
assert
(
list
(
map
(
dict
,
db
.
execute
(
"
select * from images order by id
"
).
fetchall
()))
==
images
)
db
.
close
()
Loading