-
Notifications
You must be signed in to change notification settings - Fork 0
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
1 parent
1fc8380
commit 2093c74
Showing
25 changed files
with
810 additions
and
760 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 was deleted.
Oops, something went wrong.
3 changes: 2 additions & 1 deletion
3
tests/test_h_crossover.py → tests/test_algorithm/test_crossover.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
3 changes: 2 additions & 1 deletion
3
tests/test_h_mutation.py → tests/test_algorithm/test_mutation.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
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.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Empty file.
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,33 @@ | ||
# import unittest | ||
# | ||
# from space.model import Backdoor | ||
# from pysatmc.variables import Range | ||
# | ||
# from core.model.point import Point | ||
# from core.module.comparator import MinValueMaxSize | ||
# | ||
# | ||
# class TestComparator(unittest.TestCase): | ||
# def test_min_value_max_size(self): | ||
# comparator = MinValueMaxSize() | ||
# backdoor = Backdoor(Range(start=1, length=8)) | ||
# self.assertGreater( | ||
# Point(backdoor.make_copy([]), comparator).set(value=1000), | ||
# Point(backdoor.make_copy([0, 0, 1]), comparator).set(value=900), | ||
# ) | ||
# self.assertGreater( | ||
# Point(backdoor.make_copy([0, 0, 1]), comparator).set(value=1000), | ||
# Point(backdoor.make_copy([1, 1, 1]), comparator).set(value=1000), | ||
# ) | ||
# self.assertEqual( | ||
# Point(backdoor.make_copy([0, 1, 1]), comparator).set(value=1000), | ||
# Point(backdoor.make_copy([1, 0, 1]), comparator).set(value=1000), | ||
# ) | ||
# self.assertLess( | ||
# Point(backdoor.make_copy([0, 1, 1]), comparator).set(value=1000), | ||
# Point(backdoor.make_copy([0, 0, 1]), comparator).set(value=1000), | ||
# ) | ||
# self.assertLess( | ||
# Point(backdoor.make_copy([0, 1, 1]), comparator).set(value=1000), | ||
# Point(backdoor.make_copy([1, 0, 1]), comparator).set(value=float('inf')), | ||
# ) |
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,34 @@ | ||
# import unittest | ||
# | ||
# from core.module.limitation import WallTime, Iteration | ||
# | ||
# | ||
# class TestLimitation(unittest.TestCase): | ||
# def test_iteration(self): | ||
# limitation = Iteration(value=1000) | ||
# self.assertEqual(limitation.exhausted(), False) | ||
# self.assertEqual(limitation.left('time'), None) | ||
# self.assertEqual(limitation.left('iteration'), 1000) | ||
# | ||
# limitation.increase('iteration', 990) | ||
# self.assertEqual(limitation.left('iteration'), 10) | ||
# | ||
# limitation.set('iteration', 1234) | ||
# self.assertEqual(limitation.left('iteration'), 0) | ||
# self.assertEqual(limitation.get('iteration'), 1234) | ||
# self.assertEqual(limitation.exhausted(), True) | ||
# | ||
# def test_wall_time(self): | ||
# limitation = WallTime(from_string='02:13:45') | ||
# self.assertEqual(limitation.exhausted(), False) | ||
# self.assertEqual(limitation.left('time'), 8025) | ||
# self.assertEqual(limitation.left('iteration'), None) | ||
# | ||
# limitation.increase('time', 654) | ||
# self.assertEqual(limitation.get('time'), 654) | ||
# self.assertEqual(limitation.left('time'), 7371) | ||
# | ||
# limitation.set('time', 10345) | ||
# self.assertEqual(limitation.left('time'), 0) | ||
# self.assertEqual(limitation.get('time'), 10345) | ||
# self.assertEqual(limitation.exhausted(), True) |
Oops, something went wrong.