<html><body>
<p>1 new commit in yt:</p>
<p><a href="https://bitbucket.org/yt_analysis/yt/commits/0157f4cbca3c/">https://bitbucket.org/yt_analysis/yt/commits/0157f4cbca3c/</a> Changeset:   0157f4cbca3c Branch:      yt User:        ngoldbaum Date:        2016-04-06 18:21:45+00:00 Summary:     Merged in xarthisius/yt (pull request #2101)</p>
<p>Unify answer tests' yaml files Affected #:  5 files</p>
<p>diff -r 47103efaf15acd4f13408b11f292e05e1cb4abcc -r 0157f4cbca3c05129132f83fb1a8ad9d61084b8d doc/source/developing/testing.rst --- a/doc/source/developing/testing.rst +++ b/doc/source/developing/testing.rst @@ -485,12 +485,12 @@</p>
<pre>autodiscovered by `nose <http://nose.readthedocs.org/en/latest/>`_ itself,
answer tests require definition of which set of tests constitute to a given
answer. Configuration for the integration server is stored in</pre>
<p>-*tests/tests_2.7.yaml* in the main yt repository: +*tests/tests.yaml* in the main yt repository:</p>
<pre>.. code-block:: yaml

   answer_tests:</pre>
<ul><li><p>local_artio_270:</p></li></ul>
<p>+      local_artio_000:</p>
<pre>- yt/frontends/artio/tests/test_outputs.py
    # ...
    other_tests:</pre>
<p>@@ -498,7 +498,7 @@</p>
<pre>         - '-v'
         - '-s'
</pre>
<p>-Each element under <strong>answer_tests</strong> defines answer name (*local_artio_270* in above +Each element under <strong>answer_tests</strong> defines answer name (*local_artio_000* in above</p>
<pre>snippet) and specifies a list of files/classes/methods that will be validated
(*yt/frontends/artio/tests/test_outputs.py* in above snippet). On the testing
server it is translated to:</pre>
<p>@@ -506,7 +506,7 @@</p>
<pre>.. code-block:: bash

   $ nosetests --with-answer-testing --local --local-dir ... --answer-big-data \</pre>
<ul><li><p>--answer-name=local_artio_270 \</p></li></ul>
<p>+      --answer-name=local_artio_000 \</p>
<pre>      yt/frontends/artio/tests/test_outputs.py

If the answer doesn't exist on the server yet, ``nosetests`` is run twice and</pre>
<p>@@ -516,21 +516,21 @@</p>
<pre>~~~~~~~~~~~~~~~~

In order to regenerate answers for a particular set of tests it is sufficient to</pre>
<p>-change the answer name in <strong>tests/tests_2.7.yaml</strong> e.g.: +change the answer name in <strong>tests/tests.yaml</strong> e.g.:</p>
<pre>.. code-block:: diff
</pre>
<ul><li><p>--- a/tests/tests_2.7.yaml</p></li>
<li><p>+++ b/tests/tests_2.7.yaml</p></li></ul>
<p>+   --- a/tests/tests.yaml +   +++ b/tests/tests.yaml</p>
<pre>   @@ -25,7 +25,7 @@
        - yt/analysis_modules/halo_finding/tests/test_rockstar.py
        - yt/frontends/owls_subfind/tests/test_outputs.py
</pre>
<ul><li><ul><li><p>local_owls_270:</p></li></ul></li>
<li><p>+  local_owls_271:</p></li></ul>
<p>+   –  local_owls_000: +   +  local_owls_001:</p>
<pre>        - yt/frontends/owls/tests/test_outputs.py
</pre>
<ul><li><p>local_pw_270:</p></li></ul>
<p>+      local_pw_000:</p>
<pre>would regenerate answers for OWLS frontend.
</pre>
<p>@@ -538,20 +538,35 @@</p>
<pre>~~~~~~~~~~~~~~~~~~~~~~~

In order to add a new set of answer tests, it is sufficient to extend the</pre>
<p>-*answer_tests* list in <strong>tests/tests_2.7.yaml</strong> e.g.: +*answer_tests* list in <strong>tests/tests.yaml</strong> e.g.:</p>
<pre>.. code-block:: diff
</pre>
<ul><li><p>--- a/tests/tests_2.7.yaml</p></li>
<li><p>+++ b/tests/tests_2.7.yaml</p></li></ul>
<p>+   --- a/tests/tests.yaml +   +++ b/tests/tests.yaml</p>
<pre>   @@ -60,6 +60,10 @@
        - yt/analysis_modules/absorption_spectrum/tests/test_absorption_spectrum.py:test_absorption_spectrum_non_cosmo
        - yt/analysis_modules/absorption_spectrum/tests/test_absorption_spectrum.py:test_absorption_spectrum_cosmo
</pre>
<ul><li><p>+  local_gdf_270:</p></li></ul>
<p>+   +  local_gdf_000:</p>
<pre>   +    - yt/frontends/gdf/tests/test_outputs.py
   +
   +
    other_tests:
      unittests:
</pre>
<p>+Restricting Python Versions for Answer Tests +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +If for some reason a test can be run only for a specific version of python it is +possible to indicate this by adding a ``[py2]`` or ``[py3]`` tag. For example: + +.. code-block:: yaml + +   answer_tests: +      local_test_000: +         – yt/test_A.py  # [py2] +         – yt/test_B.py  # [py3] + +would result in ``test_A.py`` being run only for <strong>python2</strong> and ``test_B.py`` +being run only for <strong>python3</strong>.</p>
<p>diff -r 47103efaf15acd4f13408b11f292e05e1cb4abcc -r 0157f4cbca3c05129132f83fb1a8ad9d61084b8d tests/nose_runner.py --- a/tests/nose_runner.py +++ b/tests/nose_runner.py @@ -7,7 +7,6 @@</p>
<pre>from yt.config import ytcfg
from yt.utilities.answer_testing.framework import AnswerTesting
</pre>
<p>–</p>
<pre>class NoseWorker(multiprocessing.Process):

    def __init__(self, task_queue, result_queue):</pre>
<p>@@ -54,10 +53,19 @@</p>
<pre>def generate_tasks_input():</pre>
<p>+    pyver = “py{}{}".format(sys.version_info.major, sys.version_info.minor) +    if sys.version_info < (3, 0, 0): +        DROP_TAG = “py3” +    else: +        DROP_TAG = "py2” +</p>
<pre>test_dir = ytcfg.get("yt", "test_data_dir")
answers_dir = os.path.join(test_dir, "answers")</pre>
<ul><li><p>with open('tests/tests_%i.%i.yaml' % sys.version_info[:2], ‘r’) as obj:</p></li>
<li><p>tests = yaml.load(obj)</p></li></ul>
<p>+    with open('tests/tests.yaml', ‘r’) as obj: +        lines = obj.read() +    data = ‘\n'.join([line for line in lines.split('\n’) +                      if DROP_TAG not in line]) +    tests = yaml.load(data)</p>
<pre>     base_argv = ['--local-dir=%s' % answers_dir, '-v',
'--with-answer-testing', '--answer-big-data', '--local']</pre>
<p>@@ -66,9 +74,11 @@</p>
<pre>for test in list(tests["other_tests"].keys()):
    args.append([test] + tests["other_tests"][test])
for answer in list(tests["answer_tests"].keys()):</pre>
<ul><li><p>argv = [answer]</p></li></ul>
<p>+        if tests["answer_tests"][answer] is None: +            continue +        argv = ["{}_{}".format(pyver, answer)]</p>
<pre>argv += base_argv</pre>
<ul><li><p>argv.append('--answer-name=%s' % answer)</p></li></ul>
<p>+        argv.append('--answer-name=%s' % argv[0])</p>
<pre>        argv += tests["answer_tests"][answer]
        args.append(argv)
</pre>
<p>diff -r 47103efaf15acd4f13408b11f292e05e1cb4abcc -r 0157f4cbca3c05129132f83fb1a8ad9d61084b8d tests/tests.yaml --- /dev/null +++ b/tests/tests.yaml @@ -0,0 +1,73 @@ +answer_tests: +  local_artio_000: +    – yt/frontends/artio/tests/test_outputs.py + +  local_athena_000: +    – yt/frontends/athena + +  local_chombo_000: +    – yt/frontends/chombo/tests/test_outputs.py + +  local_enzo_000: +    – yt/frontends/enzo + +  local_fits_000: +    – yt/frontends/fits/tests/test_outputs.py + +  local_flash_000: +    – yt/frontends/flash/tests/test_outputs.py + +  local_gadget_000: +    – yt/frontends/gadget/tests/test_outputs.py + +  local_gdf_000: +    – yt/frontends/gdf/tests/test_outputs.py + +  local_halos_000: +    – yt/analysis_modules/halo_analysis/tests/test_halo_finders.py  # [py2] +    – yt/analysis_modules/halo_finding/tests/test_rockstar.py  # [py2] +    – yt/frontends/owls_subfind/tests/test_outputs.py +    – yt/frontends/gadget_fof/tests/test_outputs.py:test_fields_g5 +    – yt/frontends/gadget_fof/tests/test_outputs.py:test_fields_g42 + +  local_owls_000: +    – yt/frontends/owls/tests/test_outputs.py + +  local_pw_000: +    – yt/visualization/tests/test_plotwindow.py:test_attributes +    – yt/visualization/tests/test_plotwindow.py:test_attributes_wt +    – yt/visualization/tests/test_profile_plots.py:test_phase_plot_attributes +    – yt/visualization/tests/test_particle_plot.py:test_particle_projection_answers +    – yt/visualization/tests/test_particle_plot.py:test_particle_projection_filter +    – yt/visualization/tests/test_particle_plot.py:test_particle_phase_answers + +  local_tipsy_000: +    – yt/frontends/tipsy/tests/test_outputs.py + +  local_varia_000: +    – yt/analysis_modules/radmc3d_export +    – yt/frontends/moab/tests/test_c5.py +    – yt/analysis_modules/photon_simulator/tests/test_spectra.py +    – yt/analysis_modules/photon_simulator/tests/test_sloshing.py +    – yt/visualization/volume_rendering/tests/test_vr_orientation.py +    – yt/visualization/volume_rendering/tests/test_mesh_render.py + +  local_orion_000: +    – yt/frontends/boxlib/tests/test_orion.py + +  local_ramses_000: +    – yt/frontends/ramses/tests/test_outputs.py + +  local_ytdata_000: +    – yt/frontends/ytdata + +  local_absorption_spectrum_000: +    – yt/analysis_modules/absorption_spectrum/tests/test_absorption_spectrum.py:test_absorption_spectrum_non_cosmo +    – yt/analysis_modules/absorption_spectrum/tests/test_absorption_spectrum.py:test_absorption_spectrum_cosmo + +other_tests: +  unittests: +     – ‘-v’ +  cookbook: +     – ‘-v’ +     – ‘doc/source/cookbook/tests/test_cookbook.py’</p>
<p>diff -r 47103efaf15acd4f13408b11f292e05e1cb4abcc -r 0157f4cbca3c05129132f83fb1a8ad9d61084b8d tests/tests_2.7.yaml --- a/tests/tests_2.7.yaml +++ /dev/null @@ -1,71 +0,0 @@ -answer_tests:</p>
<ul><li><p>local_artio_270:</p></li>
<li><ul><li><p>yt/frontends/artio/tests/test_outputs.py</p></li></ul></li></ul>
<p>–</p>
<ul><li><p>local_athena_270:</p></li>
<li><ul><li><p>yt/frontends/athena</p></li></ul></li></ul>
<p>–</p>
<ul><li><p>local_chombo_271:</p></li>
<li><ul><li><p>yt/frontends/chombo/tests/test_outputs.py</p></li></ul></li></ul>
<p>–</p>
<ul><li><p>local_enzo_270:</p></li>
<li><ul><li><p>yt/frontends/enzo</p></li></ul></li></ul>
<p>–</p>
<ul><li><p>local_fits_270:</p></li>
<li><ul><li><p>yt/frontends/fits/tests/test_outputs.py</p></li></ul></li></ul>
<p>–</p>
<ul><li><p>local_flash_270:</p></li>
<li><ul><li><p>yt/frontends/flash/tests/test_outputs.py</p></li></ul></li></ul>
<p>–</p>
<ul><li><p>local_gadget_270:</p></li>
<li><ul><li><p>yt/frontends/gadget/tests/test_outputs.py</p></li></ul></li></ul>
<p>–</p>
<ul><li><p>local_gdf_270:</p></li>
<li><ul><li><p>yt/frontends/gdf/tests/test_outputs.py</p></li></ul></li></ul>
<p>–</p>
<ul><li><p>local_halos_270:</p></li>
<li><ul><li><p>yt/analysis_modules/halo_analysis/tests/test_halo_finders.py</p></li></ul></li>
<li><ul><li><p>yt/analysis_modules/halo_finding/tests/test_rockstar.py</p></li></ul></li>
<li><ul><li><p>yt/frontends/owls_subfind/tests/test_outputs.py</p></li></ul></li></ul>
<p>–</p>
<ul><li><p>local_owls_270:</p></li>
<li><ul><li><p>yt/frontends/owls/tests/test_outputs.py</p></li></ul></li></ul>
<p>–</p>
<ul><li><p>local_pw_271:</p></li>
<li><ul><li><p>yt/visualization/tests/test_plotwindow.py:test_attributes</p></li></ul></li>
<li><ul><li><p>yt/visualization/tests/test_plotwindow.py:test_attributes_wt</p></li></ul></li>
<li><ul><li><p>yt/visualization/tests/test_profile_plots.py:test_phase_plot_attributes</p></li></ul></li>
<li><ul><li><p>yt/visualization/tests/test_particle_plot.py:test_particle_projection_answers</p></li></ul></li>
<li><ul><li><p>yt/visualization/tests/test_particle_plot.py:test_particle_projection_filter</p></li></ul></li>
<li><ul><li><p>yt/visualization/tests/test_particle_plot.py:test_particle_phase_answers</p></li></ul></li></ul>
<p>–</p>
<ul><li><p>local_tipsy_270:</p></li>
<li><ul><li><p>yt/frontends/tipsy/tests/test_outputs.py</p></li></ul></li></ul>
<p>–</p>
<ul><li><p>local_varia_274:</p></li>
<li><ul><li><p>yt/analysis_modules/radmc3d_export</p></li></ul></li>
<li><ul><li><p>yt/frontends/moab/tests/test_c5.py</p></li></ul></li>
<li><ul><li><p>yt/analysis_modules/photon_simulator/tests/test_spectra.py</p></li></ul></li>
<li><ul><li><p>yt/analysis_modules/photon_simulator/tests/test_sloshing.py</p></li></ul></li>
<li><ul><li><p>yt/visualization/volume_rendering/tests/test_vr_orientation.py</p></li></ul></li>
<li><ul><li><p>yt/visualization/volume_rendering/tests/test_mesh_render.py</p></li></ul></li></ul>
<p>–</p>
<ul><li><p>local_orion_270:</p></li>
<li><ul><li><p>yt/frontends/boxlib/tests/test_orion.py</p></li></ul></li></ul>
<p>–</p>
<ul><li><p>local_ramses_270:</p></li>
<li><ul><li><p>yt/frontends/ramses/tests/test_outputs.py</p></li></ul></li></ul>
<p>–</p>
<ul><li><p>local_ytdata_270:</p></li>
<li><ul><li><p>yt/frontends/ytdata</p></li></ul></li></ul>
<p>–</p>
<ul><li><p>local_absorption_spectrum_271:</p></li>
<li><ul><li><p>yt/analysis_modules/absorption_spectrum/tests/test_absorption_spectrum.py:test_absorption_spectrum_non_cosmo</p></li></ul></li>
<li><ul><li><p>yt/analysis_modules/absorption_spectrum/tests/test_absorption_spectrum.py:test_absorption_spectrum_cosmo</p></li></ul></li></ul>
<p>– -other_tests:</p>
<ul><li><p>unittests:</p></li>
<li><ul><li><p>‘-v’</p></li></ul></li>
<li><p>cookbook:</p></li>
<li><ul><li><p>‘-v’</p></li></ul></li>
<li><ul><li><p>‘doc/source/cookbook/tests/test_cookbook.py’</p></li></ul></li></ul>
<p>diff -r 47103efaf15acd4f13408b11f292e05e1cb4abcc -r 0157f4cbca3c05129132f83fb1a8ad9d61084b8d tests/tests_3.5.yaml --- a/tests/tests_3.5.yaml +++ /dev/null @@ -1,71 +0,0 @@ -answer_tests:</p>
<ul><li><p>local_artio_350:</p></li>
<li><ul><li><p>yt/frontends/artio/tests/test_outputs.py</p></li></ul></li></ul>
<p>–</p>
<ul><li><p>local_athena_350:</p></li>
<li><ul><li><p>yt/frontends/athena</p></li></ul></li></ul>
<p>–</p>
<ul><li><p>local_chombo_350:</p></li>
<li><ul><li><p>yt/frontends/chombo/tests/test_outputs.py</p></li></ul></li></ul>
<p>–</p>
<ul><li><p>local_enzo_350:</p></li>
<li><ul><li><p>yt/frontends/enzo</p></li></ul></li></ul>
<p>–</p>
<ul><li><p>local_fits_350:</p></li>
<li><ul><li><p>yt/frontends/fits/tests/test_outputs.py</p></li></ul></li></ul>
<p>–</p>
<ul><li><p>local_flash_350:</p></li>
<li><ul><li><p>yt/frontends/flash/tests/test_outputs.py</p></li></ul></li></ul>
<p>–</p>
<ul><li><p>local_gadget_350:</p></li>
<li><ul><li><p>yt/frontends/gadget/tests/test_outputs.py</p></li></ul></li></ul>
<p>–</p>
<ul><li><p>local_gdf_350:</p></li>
<li><ul><li><p>yt/frontends/gdf/tests/test_outputs.py</p></li></ul></li></ul>
<p>–</p>
<ul><li><p>local_halos_350:</p></li>
<li><ul><li><p>yt/frontends/owls_subfind/tests/test_outputs.py</p></li></ul></li>
<li><ul><li><p>yt/frontends/gadget_fof/tests/test_outputs.py:test_fields_g5</p></li></ul></li>
<li><ul><li><p>yt/frontends/gadget_fof/tests/test_outputs.py:test_fields_g42</p></li></ul></li></ul>
<p>–</p>
<ul><li><p>local_owls_350:</p></li>
<li><ul><li><p>yt/frontends/owls/tests/test_outputs.py</p></li></ul></li></ul>
<p>–</p>
<ul><li><p>local_pw_350:</p></li>
<li><ul><li><p>yt/visualization/tests/test_plotwindow.py:test_attributes</p></li></ul></li>
<li><ul><li><p>yt/visualization/tests/test_plotwindow.py:test_attributes_wt</p></li></ul></li>
<li><ul><li><p>yt/visualization/tests/test_profile_plots.py:test_phase_plot_attributes</p></li></ul></li>
<li><ul><li><p>yt/visualization/tests/test_particle_plot.py:test_particle_projection_answers</p></li></ul></li>
<li><ul><li><p>yt/visualization/tests/test_particle_plot.py:test_particle_projection_filter</p></li></ul></li>
<li><ul><li><p>yt/visualization/tests/test_particle_plot.py:test_particle_phase_answers</p></li></ul></li></ul>
<p>–</p>
<ul><li><p>local_tipsy_350:</p></li>
<li><ul><li><p>yt/frontends/tipsy/tests/test_outputs.py</p></li></ul></li></ul>
<p>–</p>
<ul><li><p>local_varia_351:</p></li>
<li><ul><li><p>yt/analysis_modules/radmc3d_export</p></li></ul></li>
<li><ul><li><p>yt/frontends/moab/tests/test_c5.py</p></li></ul></li>
<li><ul><li><p>yt/analysis_modules/photon_simulator/tests/test_spectra.py</p></li></ul></li>
<li><ul><li><p>yt/analysis_modules/photon_simulator/tests/test_sloshing.py</p></li></ul></li>
<li><ul><li><p>yt/visualization/volume_rendering/tests/test_vr_orientation.py</p></li></ul></li>
<li><ul><li><p>yt/visualization/volume_rendering/tests/test_mesh_render.py</p></li></ul></li></ul>
<p>–</p>
<ul><li><p>local_orion_350:</p></li>
<li><ul><li><p>yt/frontends/boxlib/tests/test_orion.py</p></li></ul></li></ul>
<p>–</p>
<ul><li><p>local_ramses_350:</p></li>
<li><ul><li><p>yt/frontends/ramses/tests/test_outputs.py</p></li></ul></li></ul>
<p>–</p>
<ul><li><p>local_ytdata_350:</p></li>
<li><ul><li><p>yt/frontends/ytdata</p></li></ul></li></ul>
<p>–</p>
<ul><li><p>local_absorption_spectrum_350:</p></li>
<li><ul><li><p>yt/analysis_modules/absorption_spectrum/tests/test_absorption_spectrum.py:test_absorption_spectrum_non_cosmo</p></li></ul></li>
<li><ul><li><p>yt/analysis_modules/absorption_spectrum/tests/test_absorption_spectrum.py:test_absorption_spectrum_cosmo</p></li></ul></li></ul>
<p>– -other_tests:</p>
<ul><li><p>unittests:</p></li>
<li><ul><li><p>‘-v’</p></li></ul></li>
<li><p>cookbook:</p></li>
<li><ul><li><p>‘-v’</p></li></ul></li>
<li><ul><li><p>‘doc/source/cookbook/tests/test_cookbook.py’</p></li></ul></li></ul>
<p>Repository URL: <a href="https://bitbucket.org/yt_analysis/yt/">https://bitbucket.org/yt_analysis/yt/</a></p>
<p>—</p>
<p>This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email.</p>

<img src="http://link.bitbucket.org/wf/open?upn=ll4ctv0L-2ByeRZFC1LslHcg6aJmnQ70VruLbmeLQr27AuW3bbmNyRqYkrc8CyF7nq8WVipCY2FtbIK9JxUVCkHg3mSABEY0iMwWZXEuJFZ2pOaqUNc7NHfLVXeFGmFZYCHUgDtUilgX0hQ-2Btx9j1qJMO160JBn1zktbXoTtUNzlt4uni8nDvSf0EoYfPqrhMlvLFz45JmRzePI0MvN7dPv5D4GaSu7zoO-2BWXfri-2B8vcw-3D" alt="" width="1" height="1" border="0" style="height:1px !important;width:1px !important;border-width:0 !important;margin-top:0 !important;margin-bottom:0 !important;margin-right:0 !important;margin-left:0 !important;padding-top:0 !important;padding-bottom:0 !important;padding-right:0 !important;padding-left:0 !important;"/>
</body></html>