Commits

Anonymous committed 3eba9c5

add info method; print info in travis

  • Participants
  • Parent commits 0d35f50

Comments (0)

Files changed (2)

     - if [[ `python -c "import sys; print(int(sys.version_info < (2, 7)))"` == "1" ]]; then pip install --use-mirrors unittest2; fi
     - pip install --use-mirrors .
     - pip install --use-mirrors flake8
+before_script:
+    - python -c "from pystacia import magick; from pprint import pprint; pprint(magick.info())"
 script:
+    - flake8 .
     - nosetests
-    - flake8 .

File pystacia/magick/__init__.py

 def get_formats():
     return impl.get_formats()
 
+
+@memoized
+def info():
+    return {'options': get_options(),
+            'formats': get_formats(),
+            'dll': get_dll()._name}
+
 from pystacia.api import get_dll
 from pystacia.api.func import c_call
 from pystacia.magick import _impl as impl