Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
bob
bob.pad.base
Commits
742401f6
Commit
742401f6
authored
Nov 30, 2017
by
Amir MOHAMMADI
Browse files
Add tests for flat=True
parent
a590ba6e
Pipeline
#14441
failed with stages
in 4 minutes and 48 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
bob/pad/base/test/test_databases.py
View file @
742401f6
...
...
@@ -43,6 +43,10 @@ class DummyDatabaseSqlTest(unittest.TestCase):
check_file
(
db
.
training_files
(),
2
)
check_file
(
db
.
files
([
1
]))
check_file
(
db
.
reverse
([
"test/path"
]))
# check if flat returns flat files
assert
len
(
db
.
all_files
(
flat
=
True
))
==
2
,
db
.
all_files
(
flat
=
True
)
check_file
(
db
.
all_files
(
flat
=
True
)[
0
:
1
])
check_file
(
db
.
all_files
(
flat
=
True
)[
1
:
2
])
file
=
db
.
objects
()[
0
]
assert
db
.
original_file_name
(
file
)
==
"original/directory/test/path.orig"
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment