Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Validata
Validata Core
Commits
3bf53fcd
Commit
3bf53fcd
authored
Oct 19, 2021
by
Pierre Dittgen
Browse files
Remove unused code
parent
33f35dca
Changes
1
Show whitespace changes
Inline
Side-by-side
tests/test_core.py
View file @
3bf53fcd
import
pytest
from
openpyxl
import
Workbook
from
validata_core
import
validate
from
validata_core.helpers
import
FileContentValidataResource
,
ValidataSourceError
...
...
@@ -157,20 +156,3 @@ def test_disordered_columns(schema_abc):
assert
(
report
[
"tasks"
][
0
][
"structure_warnings"
][
0
][
"code"
]
==
"disordered-header-warn"
)
# XLSX
def
validate_xlsx_bytes
(
bytes_source_content
,
schema
):
validata_source
=
FileContentValidataResource
(
"foo.xlsx"
,
bytes_source_content
)
header
,
rows
=
validata_source
.
extract_tabular_data
()
return
validate
([
header
]
+
rows
,
schema
)
def
build_one_cell_xlsx
(
cell
):
wb
=
Workbook
()
ws1
=
wb
.
active
ws1
[
"A1"
]
=
"A"
ws1
[
"A2"
]
=
cell
return
wb
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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