[yt-svn] commit/yt: xarthisius: Merged in xarthisius/yt (pull request #1182)

commits-noreply at bitbucket.org commits-noreply at bitbucket.org
Fri Sep 5 13:39:20 PDT 2014


1 new commit in yt:

https://bitbucket.org/yt_analysis/yt/commits/4213eccc3637/
Changeset:   4213eccc3637
Branch:      yt
User:        xarthisius
Date:        2014-09-05 22:39:10
Summary:     Merged in xarthisius/yt (pull request #1182)

Adding tests for cookbook recipes
Affected #:  1 file

diff -r 26d5d6adac5fd0d2fba836998eb2a56f46427dd3 -r 4213eccc36377db50db635191deff0672ca743bb doc/source/cookbook/tests/test_cookbook.py
--- /dev/null
+++ b/doc/source/cookbook/tests/test_cookbook.py
@@ -0,0 +1,29 @@
+# -*- coding: utf-8 -*-
+"""Module for cookbook testing
+
+
+This test should be run from main yt directory.
+
+Example:
+
+      $ sed -e '/where/d' -i nose.cfg setup.cfg
+      $ nosetests doc/source/cookbook/tests/test_cookbook.py -P -v
+"""
+import glob
+import os
+import sys
+
+sys.path.append(os.path.join(os.getcwd(), "doc/source/cookbook"))
+
+
+def test_recipe():
+    '''Dummy test grabbing all cookbook's recipes'''
+    for fname in glob.glob("doc/source/cookbook/*.py"):
+        module_name = os.path.splitext(os.path.basename(fname))[0]
+        yield check_recipe, module_name
+
+
+def check_recipe(module_name):
+    '''Run single recipe'''
+    __import__(module_name)
+    assert True

Repository URL: https://bitbucket.org/yt_analysis/yt/

--

This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.



More information about the yt-svn mailing list