-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add unittests #29
base: master
Are you sure you want to change the base?
Add unittests #29
Conversation
Added tests for Condition class
@@ -24,7 +24,7 @@ def __init__(self, typez, params): | |||
params = (params,) | |||
self.params = params # e.g. ('highway','primary') | |||
if typez == "regex": | |||
self.regex = re.compile(self.params[0], re.I) | |||
self.regex = re.compile(self.params[1], re.I) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here I fixed bug with regex conditions: [natural=~/water.+/]
. Organic Maps never used such conditions in MapCSS styles.
Should we remove regex conditions completely from the kothic
?
26c73f6
to
7b39eae
Compare
1fab805
to
4adcd77
Compare
import logging | ||
|
||
logger = logging.getLogger('mapcss.Eval') | ||
logger.setLevel(logging.ERROR) | ||
|
||
class Eval(): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This class is responsible for eval(...)
expressions in .mapcss files. But Organic Maps never used evals in styles.
Should we remove eval completely from the project?
kothic
with unittestsf""
stringsHere I'm covering all base classes
Rule
,Condition
,MapCSS
,Eval
,libkomwm.py
with unit-tests to make sure nothing will brake on new changes.Work in progress.