plone / plone.app.robotframework

Provides Robot Framework compatible resources and tools for writing functional Selenium tests (including acceptance tests) for Plone CMS and its add-ons.
https://docs.plone.org/external/plone.app.robotframework/docs/source/index.html
11 stars 17 forks source link

Is it possible to override RELOAD_EXTENSIONS? #39

Closed cillianderoiste closed 9 years ago

cillianderoiste commented 9 years ago

I'd like to ignore changes to .pt files when using debug mode so that I don't have to go through all the test setup when I tweak some page templates. I see that reload.py reads the environment variable $RELOAD_EXTENSIONS [1] but I'm not sure if there's a way to pass a bash array which will be interpreted as a list/tuple. I've tried things like RELOAD_EXTENSIONS=(py zcml) but that is just interpreted as the string '(py zcml)', so I suspect we need to parse it. Perhaps we could pass a comma separated string instead and just split() that?

If there isn't already a way to override the list of file extensions to watch, I wonder if we should just disable watching .pt files when in debug mode? (I'm happy to implement that, if it sounds like a good idea.)

https://github.com/plone/plone.app.robotframework/blob/master/src/plone/app/robotframework/reload.py#L22

datakurre commented 9 years ago

@cillianderoiste You are correct both ways. The env value is not parsed correctly (a bug) and PT files should not trigger reload in debug mode.

If you can fix this and provide a pull, please do it :)

cillianderoiste commented 9 years ago

Thanks, I'll have a shot at replacing the use of RELOAD_EXTENSIONS as an environment variable with an extra parameter (--reload-extensions -x) that takes a list of file extensions. If it isn't specified and if debug mode is enabled, then it would also not watch .pt files.