Skip to content
Snippets Groups Projects
Commit 5e28b4d7 authored by dh00601's avatar dh00601
Browse files

updating tests

parent 1696901c
No related branches found
No related tags found
No related merge requests found
Showing
with 1007 additions and 27 deletions
......@@ -54,7 +54,13 @@ from binarycpython.tests.test_grid import (
test__return_argline,
test_return_population_settings,
test_return_binary_c_defaults,
test_return_all_info
test_return_all_info,
test_export_all_info,
test__cleanup_defaults,
test__increment_probtot,
test__increment_count,
test__dict_from_line_source_file,
test_evolve_single
)
from binarycpython.tests.test_plot_functions import (
test_color_by_index,
......@@ -65,10 +71,10 @@ from binarycpython.tests.test_run_system_wrapper import *
from binarycpython.tests.tests_population_extensions.test__distribution_functions import (
test_flat,
test_number,
test_const
test_const_distribution
)
from binarycpython.tests.tests_population_extensions.test__grid_options_defaults import (
test_grid_options_help,
test_grid_options_help,
test_grid_options_description_checker,
test_write_grid_options_to_rst_file,
)
......
......@@ -283,4 +283,7 @@ class test_inspect_dict(unittest.TestCase):
"function": os.path.isfile,
"dict": {"int": 1, "float": 1.2},
}
output_dict = inspect_dict(input_dict, print_structure=True)
\ No newline at end of file
output_dict = inspect_dict(input_dict, print_structure=True)
if __name__ == "__main__":
unittest.main()
\ No newline at end of file
......@@ -69,4 +69,7 @@ class test_handle_ensemble_string_to_json(unittest.TestCase):
self.assertTrue(isinstance(output_dict, dict))
self.assertTrue(output_dict["ding"] == 10)
self.assertTrue(output_dict["list_example"] == [1, 2, 3])
\ No newline at end of file
self.assertTrue(output_dict["list_example"] == [1, 2, 3])
if __name__ == "__main__":
unittest.main()
......@@ -35,7 +35,6 @@ from binarycpython.utils.functions import (
TMP_DIR = temp_dir("tests", "test_functions")
class test_verbose_print(unittest.TestCase):
"""
Unittests for verbose_print
......
This diff is collapsed.
......@@ -3,3 +3,10 @@ Unittests for run_system_wrapper
"""
# TODO: write tests for run_system_wrapper
import unittest
from binarycpython.utils.run_system_wrapper import run_system
if __name__ == "__main__":
unittest.main()
......@@ -2,4 +2,9 @@
Unittests for stellar_types module
"""
from binarycpython.utils.stellar_types import STELLAR_TYPE_DICT, STELLAR_TYPE_DICT_SHORT
\ No newline at end of file
import unittest
from binarycpython.utils.stellar_types import STELLAR_TYPE_DICT, STELLAR_TYPE_DICT_SHORT
if __name__ == "__main__":
unittest.main()
......@@ -28,4 +28,9 @@ TODO: HPC_touch
TODO: HPC_status
TODO: HPC_dump_status
TODO: HPC_queue_stats
"""
\ No newline at end of file
"""
import unittest
if __name__ == "__main__":
unittest.main()
\ No newline at end of file
......@@ -10,4 +10,9 @@ TODO: _calculate_multiplicity_fraction
TODO: get_moe_di_stefano_dataset
TODO: get_Moe_di_Stefano_2017_default_options
TODO: get_Moe_di_Stefano_2017_default_options_description
"""
\ No newline at end of file
"""
import unittest
if __name__ == "__main__":
unittest.main()
\ No newline at end of file
......@@ -6,3 +6,8 @@ TODO: set_time
TODO: time_elapsed
TODO: CPU_time
"""
import unittest
if __name__ == "__main__":
unittest.main()
\ No newline at end of file
......@@ -6,3 +6,8 @@ TODO: NullCache
TODO: setup_function_cache
TODO: test_caches
"""
import unittest
if __name__ == "__main__":
unittest.main()
\ No newline at end of file
......@@ -12,4 +12,9 @@ TODO: ondor_outfile
TODO: make_condor_dirs
TODO: condor_grid
TODO: condor_queue_stats
"""
\ No newline at end of file
"""
import unittest
if __name__ == "__main__":
unittest.main()
\ No newline at end of file
......@@ -19,4 +19,9 @@ TODO: NFS_flush_hack
TODO: compression_type
TODO: open
TODO: NFSpath
"""
\ No newline at end of file
"""
import unittest
if __name__ == "__main__":
unittest.main()
\ No newline at end of file
......@@ -106,7 +106,7 @@ class test_const_distribution(unittest.TestCase):
def test_const_distribution(self):
with Capturing() as output:
self._test_const()
self._test_const_distribution()
def _test_const_distribution(self):
"""
......
......@@ -11,3 +11,8 @@ TODO: _boxed
TODO: _get_stream_logger
TODO: _clean_up_custom_logging
"""
import unittest
if __name__ == "__main__":
unittest.main()
\ No newline at end of file
......@@ -17,7 +17,6 @@ from binarycpython.utils.grid import Population
TMP_DIR = temp_dir("tests", "test_grid_options_defaults")
class test_grid_options_help(unittest.TestCase):
"""
Unit tests for the grid_options_help function
......
......@@ -72,3 +72,6 @@ class test_add_grid_variable(unittest.TestCase):
self.assertIn("q", test_pop.grid_options["_grid_variables"])
self.assertIn("lnm1", test_pop.grid_options["_grid_variables"])
self.assertEqual(len(test_pop.grid_options["_grid_variables"]), 2)
if __name__ == "__main__":
unittest.main()
"""
Unittests for hpc_functions module
"""
from binarycpython.utils.hpc_functions import *
# TODO: write tests for hpc functions
......@@ -5,3 +5,8 @@ TODO: add_system_metadata
TODO: add_ensemble_metadata
TODO: _metadata_keylist
"""
import unittest
if __name__ == "__main__":
unittest.main()
\ No newline at end of file
......@@ -13,3 +13,8 @@ TODO: make_slurm_dirs
TODO: slurm_grid
TODO: slurm_queue_stats
"""
import unittest
if __name__ == "__main__":
unittest.main()
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment