-
Notifications
You must be signed in to change notification settings - Fork 218
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
19 changed files
with
99 additions
and
86 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
include *.md | ||
include *.rst | ||
recursive-include gaft *.py | ||
recursive-include tests *.py | ||
recursive-include example *.py | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/usr/bin/env python | ||
# -*- coding: utf-8 -*- | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
#!/usr/bin/env python | ||
# -*- coding: utf-8 -*- | ||
|
||
''' Module for all test in ga.py | ||
''' | ||
|
||
import unittest | ||
|
||
from .individual_test import IndividualTest | ||
from .population_test import PopulationTest | ||
from .roulette_wheel_selection_test import RouletteWheelSelectionTest | ||
from .uniform_crossover_test import UniformCrossoverTest | ||
from .flip_bit_mutation_test import FlipBitMutationTest | ||
from .mpiutil_test import MPIUtilTest | ||
from .engine_test import GAEngineTest | ||
from .tournament_selection_test import TournamentSelectionTest | ||
from .linear_ranking_selection_test import LinearRankingSelectionTest | ||
from .exponential_ranking_selection_test import ExponentialRankingSelectionTest | ||
from .linear_scaling_test import LinearScalingTest | ||
from .dynamic_linear_scaling_test import DynamicLinearScalingTest | ||
from .flip_bit_big_mutation_test import FlipBitBigMutationTest | ||
|
||
def suite(): | ||
''' Generate test suite for all test cases in GAFT | ||
''' | ||
test_cases = [ | ||
IndividualTest, | ||
PopulationTest, | ||
RouletteWheelSelectionTest, | ||
UniformCrossoverTest, | ||
FlipBitMutationTest, | ||
MPIUtilTest, | ||
GAEngineTest, | ||
TournamentSelectionTest, | ||
LinearRankingSelectionTest, | ||
ExponentialRankingSelectionTest, | ||
LinearScalingTest, | ||
DynamicLinearScalingTest, | ||
FlipBitBigMutationTest | ||
] | ||
|
||
test_suite = unittest.TestSuite([ | ||
unittest.TestLoader().loadTestsFromTestCase(tc) for tc in test_cases | ||
]) | ||
|
||
return test_suite | ||
|
||
if '__main__' == __name__: | ||
result = unittest.TextTestRunner(verbosity=2).run(suite()) | ||
|
||
if result.errors or result.failures: | ||
raise ValueError('Get erros and failures') | ||
|
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.