Ejemplo n.º 1
0
 def make_landscape_test(self):
     filenames = set(os.listdir('.'))
     g.make_parameters_file()
     new_filenames = set(os.listdir('.'))
     filename = [*new_filenames - filenames][0]
     try:
         g.make_landscape(filename)
     except:
         print("System error, fail make landscape test.")
Ejemplo n.º 2
0
 def make_genomic_architecture_test(self):
     filenames = set(os.listdir('.'))
     g.make_parameters_file()
     new_filenames = set(os.listdir('.'))
     filename = [*new_filenames - filenames][0]
     landscape = g.make_landscape(filename)
     try:
         g.make_genomic_architecture(filename, landscape)
     except:
         print("System error, fail make community test.")
Ejemplo n.º 3
0
 def make_population_test(self):
     filenames = set(os.listdir('.'))
     g.make_parameters_file()
     new_filenames = set(os.listdir('.'))
     filename = [*new_filenames - filenames][0]
     landscape = g.make_landscape(filename)
     try:
         g.make_population(landscape, filename)
     except:
         print("System error, fail make population test.")
Ejemplo n.º 4
0
 def test_make_genomic_architecture(self):
     current_working_directory = os.getcwd()
     filepath = current_working_directory + "/GENOMICS_parameter.py"
     gnx.make_parameters_file(filepath)
     params = exec(open(filepath, 'r').read())
     g_params = params.genome
     land = gnx.make_landscape(params)
     Genomic_Architecture = gnx.make_genomic_architecture(params, land)
     genome_arch = genome._make_genomic_architecture(params, land)
     self.assertIsInstance(genome_arch, Genomic_Architecture)
Ejemplo n.º 5
0
 def test_make_population(self):
     current_working_directory = os.getcwd()
     filepath = current_working_directory + "/GENOMICS_parameter.py"
     gnx.make_parameters_file(filepath)
     params = exec(open(filepath, 'r').read())
     land = gnx.make_landscape(params)
     #TODO: Need to update here
     #in order to make population we need to have land, params, pop_params
     pop = population._make_population(land, "aribitrary name", params)
     self.assertIsInstance(pop, population.Population)
Ejemplo n.º 6
0
 def test_make_individual_simple_case(self):
     current_working_directory = os.getcwd()
     filepath = current_working_directory + "/GNX_test_params.py"
     gnx.make_parameters_file(filepath)
     params = exec(open(filepath, 'r').read())
     land = gnx.make_landscape(params)
     genome_arch = gnx.structs.genome._make_genomic_architecture(params,
                                                                 land)
     ind = gnx.structs.individual._make_individual(1, True, None,
                                                   genome_arch)
     self.assertIsInstance(ind, gnx.structs.individual.Individual)
     print("It's an individual!")