yt.utilities.answer_testing.framework module

Answer Testing using Nose as a starting point

class yt.utilities.answer_testing.framework.AllFieldValuesTest(ds_fn, field, obj_type=None, decimals=None)[source]

Bases: yt.utilities.answer_testing.framework.AnswerTestingTest

compare(new_result, old_result)[source]
create_plot(ds, plot_type, plot_field, plot_axis, plot_kwargs=None)
description
entire_simulation

Return an unsorted array of values that cover the entire domain.

max_dens_location

This is a helper function to return the location of the most dense point.

prefix = ''
reference_storage = None
result_storage = None
run()[source]
sim_center

This returns the center of the domain.

storage_name
class yt.utilities.answer_testing.framework.AnalyticHaloMassFunctionTest(ds_fn, fitting_function)[source]

Bases: yt.utilities.answer_testing.framework.AnswerTestingTest

compare(new_result, old_result)[source]
create_plot(ds, plot_type, plot_field, plot_axis, plot_kwargs=None)
description
entire_simulation

Return an unsorted array of values that cover the entire domain.

max_dens_location

This is a helper function to return the location of the most dense point.

prefix = ''
reference_storage = None
result_storage = None
run()[source]
sim_center

This returns the center of the domain.

storage_name
class yt.utilities.answer_testing.framework.AnswerTestCloudStorage(reference_name=None, answer_name=None)[source]

Bases: yt.utilities.answer_testing.framework.AnswerTestStorage

dump(result_storage)[source]
get(ds_name, default=None)[source]
progress_callback(current, total)[source]
class yt.utilities.answer_testing.framework.AnswerTestLocalStorage(reference_name=None, answer_name=None)[source]

Bases: yt.utilities.answer_testing.framework.AnswerTestStorage

dump(result_storage)[source]
get(ds_name, default=None)[source]
class yt.utilities.answer_testing.framework.AnswerTestStorage(reference_name=None, answer_name=None)[source]

Bases: object

dump(result_storage, result)[source]
get(ds_name, default=None)[source]
class yt.utilities.answer_testing.framework.AnswerTesting[source]

Bases: nose.plugins.base.Plugin

addOptions(parser, env=None)

Add command-line options for this plugin.

The base plugin class adds –with-$name by default, used to enable the plugin.

Warning

Don’t implement addOptions unless you want to override all default option handling behavior, including warnings for conflicting options. Implement options instead.

add_options(parser, env=None)

Non-camel-case version of func name for backwards compatibility.

Warning

DEPRECATED: Do not use this method, use options instead.

can_configure = False
configure(options, conf)[source]
enableOpt = None
enabled = False
finalize(result=None)[source]
help()[source]
my_version
name = 'answer-testing'
options(parser, env=environ({'HG': '/usr/bin/hg', 'YT_BUILD': '/home/fido/yt-3.4.0', 'PATH': '/home/fido/yt-3.4.0/temp/bin:/usr/local/bin:/usr/bin:/bin:/opt/bin:/usr/x86_64-pc-linux-gnu/gcc-bin/4.9.2:/usr/lib/llvm/4/bin', 'EDITOR': '/bin/nano', 'MAKE_TERMOUT': 'true', 'GUILE_LOAD_PATH': '/usr/share/guile/1.8', 'PAGER': '/usr/bin/less', 'JDK_HOME': '/etc/java-config-2/current-system-vm', 'SHLVL': '1', 'JAVAC': '/etc/java-config-2/current-system-vm/bin/javac', 'LESSOPEN': '|lesspipe %s', 'SHELL': '/bin/bash', 'JAVA_HOME': '/etc/java-config-2/current-system-vm', 'PWD': '/home/fido/yt-3.4.0/doc', 'GCC_SPECS': '', 'LESS': '-R -M --shift 5', 'OLDPWD': '/home/fido/yt-3.4.0', 'MAKEFLAGS': '', '_': '/usr/bin/make', 'MANPATH': '/etc/java-config-2/current-system-vm/man:/usr/local/share/man:/usr/share/man:/usr/share/gcc-data/x86_64-pc-linux-gnu/4.9.2/man:/usr/share/binutils-data/x86_64-pc-linux-gnu/2.25/man:/usr/lib/llvm/4/share/man:/etc/java-config-2/current-system-vm/man/', 'GPERFTOOLS': 'yes', 'HOME': '/home/fido', 'USER': 'fido', 'INFOPATH': '/usr/share/info:/usr/share/gcc-data/x86_64-pc-linux-gnu/4.9.2/info:/usr/share/binutils-data/x86_64-pc-linux-gnu/2.25/info', 'OPENGL_PROFILE': 'xorg-x11', 'MAKELEVEL': '1', 'CONFIG_PROTECT_MASK': '/etc/gentoo-release /etc/sandbox.d /etc/fonts/fonts.conf /etc/terminfo /etc/ca-certificates.conf /etc/texmf/web2c /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/revdep-rebuild', 'LOGNAME': 'fido', 'MAKE_TERMERR': 'true', 'MFLAGS': '', 'PYTHONPATH': '/home/fido/yt-3.4.0:/home/fido/yt-3.4.0/temp/lib64/python3.4/site-packages'}))[source]
score = 100
tolist(val)
class yt.utilities.answer_testing.framework.AnswerTestingTest(ds_fn)[source]

Bases: object

compare(new_result, old_result)[source]
create_plot(ds, plot_type, plot_field, plot_axis, plot_kwargs=None)[source]
description
entire_simulation

Return an unsorted array of values that cover the entire domain.

max_dens_location

This is a helper function to return the location of the most dense point.

prefix = ''
reference_storage = None
result_storage = None
sim_center

This returns the center of the domain.

storage_name
class yt.utilities.answer_testing.framework.AxialPixelizationTest(ds_fn, decimals=None)[source]

Bases: yt.utilities.answer_testing.framework.AnswerTestingTest

compare(new_result, old_result)[source]
create_plot(ds, plot_type, plot_field, plot_axis, plot_kwargs=None)
description
entire_simulation

Return an unsorted array of values that cover the entire domain.

max_dens_location

This is a helper function to return the location of the most dense point.

prefix = ''
reference_storage = None
result_storage = None
run()[source]
sim_center

This returns the center of the domain.

storage_name
class yt.utilities.answer_testing.framework.FieldValuesTest(ds_fn, field, obj_type=None, particle_type=False, decimals=10)[source]

Bases: yt.utilities.answer_testing.framework.AnswerTestingTest

compare(new_result, old_result)[source]
create_plot(ds, plot_type, plot_field, plot_axis, plot_kwargs=None)
description
entire_simulation

Return an unsorted array of values that cover the entire domain.

max_dens_location

This is a helper function to return the location of the most dense point.

prefix = ''
reference_storage = None
result_storage = None
run()[source]
sim_center

This returns the center of the domain.

storage_name
class yt.utilities.answer_testing.framework.GenericArrayTest(ds_fn, array_func, args=None, kwargs=None, decimals=None)[source]

Bases: yt.utilities.answer_testing.framework.AnswerTestingTest

compare(new_result, old_result)[source]
create_plot(ds, plot_type, plot_field, plot_axis, plot_kwargs=None)
description
entire_simulation

Return an unsorted array of values that cover the entire domain.

max_dens_location

This is a helper function to return the location of the most dense point.

prefix = ''
reference_storage = None
result_storage = None
run()[source]
sim_center

This returns the center of the domain.

storage_name
class yt.utilities.answer_testing.framework.GenericImageTest(ds_fn, image_func, decimals, args=None, kwargs=None)[source]

Bases: yt.utilities.answer_testing.framework.AnswerTestingTest

compare(new_result, old_result)[source]
create_plot(ds, plot_type, plot_field, plot_axis, plot_kwargs=None)
description
entire_simulation

Return an unsorted array of values that cover the entire domain.

max_dens_location

This is a helper function to return the location of the most dense point.

prefix = ''
reference_storage = None
result_storage = None
run()[source]
sim_center

This returns the center of the domain.

storage_name
class yt.utilities.answer_testing.framework.GridHierarchyTest(ds_fn)[source]

Bases: yt.utilities.answer_testing.framework.AnswerTestingTest

compare(new_result, old_result)[source]
create_plot(ds, plot_type, plot_field, plot_axis, plot_kwargs=None)
description
entire_simulation

Return an unsorted array of values that cover the entire domain.

max_dens_location

This is a helper function to return the location of the most dense point.

prefix = ''
reference_storage = None
result_storage = None
run()[source]
sim_center

This returns the center of the domain.

storage_name
class yt.utilities.answer_testing.framework.GridValuesTest(ds_fn, field)[source]

Bases: yt.utilities.answer_testing.framework.AnswerTestingTest

compare(new_result, old_result)[source]
create_plot(ds, plot_type, plot_field, plot_axis, plot_kwargs=None)
description
entire_simulation

Return an unsorted array of values that cover the entire domain.

max_dens_location

This is a helper function to return the location of the most dense point.

prefix = ''
reference_storage = None
result_storage = None
run()[source]
sim_center

This returns the center of the domain.

storage_name
class yt.utilities.answer_testing.framework.ParentageRelationshipsTest(ds_fn)[source]

Bases: yt.utilities.answer_testing.framework.AnswerTestingTest

compare(new_result, old_result)[source]
create_plot(ds, plot_type, plot_field, plot_axis, plot_kwargs=None)
description
entire_simulation

Return an unsorted array of values that cover the entire domain.

max_dens_location

This is a helper function to return the location of the most dense point.

prefix = ''
reference_storage = None
result_storage = None
run()[source]
sim_center

This returns the center of the domain.

storage_name
class yt.utilities.answer_testing.framework.PhasePlotAttributeTest(ds_fn, x_field, y_field, z_field, attr_name, attr_args, decimals, plot_type='PhasePlot')[source]

Bases: yt.utilities.answer_testing.framework.AnswerTestingTest

compare(new_result, old_result)[source]
create_plot(data_source, x_field, y_field, z_field, plot_type, plot_kwargs=None)[source]
description
entire_simulation

Return an unsorted array of values that cover the entire domain.

max_dens_location

This is a helper function to return the location of the most dense point.

prefix = ''
reference_storage = None
result_storage = None
run()[source]
sim_center

This returns the center of the domain.

storage_name
class yt.utilities.answer_testing.framework.PixelizedProjectionValuesTest(ds_fn, axis, field, weight_field=None, obj_type=None)[source]

Bases: yt.utilities.answer_testing.framework.AnswerTestingTest

compare(new_result, old_result)[source]
create_plot(ds, plot_type, plot_field, plot_axis, plot_kwargs=None)
description
entire_simulation

Return an unsorted array of values that cover the entire domain.

max_dens_location

This is a helper function to return the location of the most dense point.

prefix = ''
reference_storage = None
result_storage = None
run()[source]
sim_center

This returns the center of the domain.

storage_name
class yt.utilities.answer_testing.framework.PlotWindowAttributeTest(ds_fn, plot_field, plot_axis, attr_name, attr_args, decimals, plot_type='SlicePlot', callback_id='', callback_runners=None)[source]

Bases: yt.utilities.answer_testing.framework.AnswerTestingTest

compare(new_result, old_result)[source]
create_plot(ds, plot_type, plot_field, plot_axis, plot_kwargs=None)
description
entire_simulation

Return an unsorted array of values that cover the entire domain.

max_dens_location

This is a helper function to return the location of the most dense point.

prefix = ''
reference_storage = None
result_storage = None
run()[source]
sim_center

This returns the center of the domain.

storage_name
class yt.utilities.answer_testing.framework.ProjectionValuesTest(ds_fn, axis, field, weight_field=None, obj_type=None, decimals=None)[source]

Bases: yt.utilities.answer_testing.framework.AnswerTestingTest

compare(new_result, old_result)[source]
create_plot(ds, plot_type, plot_field, plot_axis, plot_kwargs=None)
description
entire_simulation

Return an unsorted array of values that cover the entire domain.

max_dens_location

This is a helper function to return the location of the most dense point.

prefix = ''
reference_storage = None
result_storage = None
run()[source]
sim_center

This returns the center of the domain.

storage_name
class yt.utilities.answer_testing.framework.SimulatedHaloMassFunctionTest(ds_fn, finder)[source]

Bases: yt.utilities.answer_testing.framework.AnswerTestingTest

compare(new_result, old_result)[source]
create_plot(ds, plot_type, plot_field, plot_axis, plot_kwargs=None)
description
entire_simulation

Return an unsorted array of values that cover the entire domain.

max_dens_location

This is a helper function to return the location of the most dense point.

prefix = ''
reference_storage = None
result_storage = None
run()[source]
sim_center

This returns the center of the domain.

storage_name
class yt.utilities.answer_testing.framework.VRImageComparisonTest(scene, ds, desc, decimals)[source]

Bases: yt.utilities.answer_testing.framework.AnswerTestingTest

compare(new_result, old_result)[source]
create_plot(ds, plot_type, plot_field, plot_axis, plot_kwargs=None)
description
entire_simulation

Return an unsorted array of values that cover the entire domain.

max_dens_location

This is a helper function to return the location of the most dense point.

prefix = ''
reference_storage = None
result_storage = None
run()[source]
sim_center

This returns the center of the domain.

storage_name
class yt.utilities.answer_testing.framework.VerifySimulationSameTest(simulation_obj)[source]

Bases: yt.utilities.answer_testing.framework.AnswerTestingTest

compare(new_result, old_result)[source]
create_plot(ds, plot_type, plot_field, plot_axis, plot_kwargs=None)
description
entire_simulation

Return an unsorted array of values that cover the entire domain.

max_dens_location

This is a helper function to return the location of the most dense point.

prefix = ''
reference_storage = None
result_storage = None
run()[source]
sim_center

This returns the center of the domain.

storage_name
yt.utilities.answer_testing.framework.big_patch_amr(ds_fn, fields, input_center='max', input_weight='density')[source]
yt.utilities.answer_testing.framework.can_run_ds(ds_fn, file_check=False)[source]
yt.utilities.answer_testing.framework.can_run_sim(sim_fn, sim_type, file_check=False)[source]
yt.utilities.answer_testing.framework.compare_image_lists(new_result, old_result, decimals)[source]
yt.utilities.answer_testing.framework.create_obj(ds, obj_type)[source]
yt.utilities.answer_testing.framework.data_dir_load(ds_fn, cls=None, args=None, kwargs=None)[source]
yt.utilities.answer_testing.framework.requires_answer_testing()[source]
yt.utilities.answer_testing.framework.requires_ds(ds_fn, big_data=False, file_check=False)[source]
yt.utilities.answer_testing.framework.requires_sim(sim_fn, sim_type, big_data=False, file_check=False)[source]
yt.utilities.answer_testing.framework.sim_dir_load(sim_fn, path=None, sim_type='Enzo', find_outputs=False)[source]
yt.utilities.answer_testing.framework.small_patch_amr(ds_fn, fields, input_center='max', input_weight='density')[source]
yt.utilities.answer_testing.framework.sph_answer(ds, ds_str_repr, ds_nparticles, fields)[source]
yt.utilities.answer_testing.framework.temp_cwd(cwd)[source]