mirror of
https://github.com/searxng/searxng.git
synced 2025-07-24 13:49:26 +02:00
[fix] float operations in calculator plugin
This patch adds an additional *isinstance* check within the ast parser to check for float along with int, fixing the underlying issue. Co-Authored: Markus Heiser <markus.heiser@darmarit.de>
This commit is contained in:
parent
d448def1a6
commit
3e87354f0e
4 changed files with 51 additions and 16 deletions
|
@ -4,6 +4,7 @@
|
|||
import logging
|
||||
import json
|
||||
from urllib.parse import ParseResult
|
||||
import babel
|
||||
from mock import Mock
|
||||
from searx.results import Timing
|
||||
|
||||
|
@ -82,6 +83,7 @@ class ViewsTestCase(SearxTestCase): # pylint: disable=missing-class-docstring,
|
|||
redirect_url=None,
|
||||
engine_data={},
|
||||
)
|
||||
search_self.search_query.locale = babel.Locale.parse("en-US", sep='-')
|
||||
|
||||
self.setattr4test(Search, 'search', search_mock)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue