From 664c9112253986529d596e016857df34627554d4 Mon Sep 17 00:00:00 2001 From: Maximilien Rigaut Date: Tue, 31 May 2022 07:05:51 +0200 Subject: [PATCH] First fix for optionnals --- src/bootstraparse/modules/export.py | 2 +- tests/modules/test_export.py | 9 ++++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/bootstraparse/modules/export.py b/src/bootstraparse/modules/export.py index ca14039..39a2710 100644 --- a/src/bootstraparse/modules/export.py +++ b/src/bootstraparse/modules/export.py @@ -10,7 +10,7 @@ from bootstraparse.modules import config, pathresolver, error_mngr, context_mngr from collections import namedtuple -from bootstraparse.modules.syntax import split_optionals, OptionalToken +from bootstraparse.modules.syntax import split_optionals, OptionalToken # noqa F401 """ Named tuple containing all necessary information to select the appropriate diff --git a/tests/modules/test_export.py b/tests/modules/test_export.py index 40ef42c..814b2f6 100644 --- a/tests/modules/test_export.py +++ b/tests/modules/test_export.py @@ -149,7 +149,14 @@ def test_get_templates(export_type, export_subtype, line): "display_level": "1" })) assert isinstance(r, export.ExportResponse) - # TODO : Add optional + r2 = em(export.ExportRequest(export_type, export_subtype, _opts, { + "header_level": "2", + "url": "2", + "col_span": "2", + "row_span": "2", + "display_level": "2" + })) + assert isinstance(r2, export.ExportResponse) def test_context_cov():