コード例 #1
0
ファイル: test_frog_pond.py プロジェクト: hellicott/FrogPond
 def test_set_constraints_sets_frog_max_range(self):
     # arrange
     self.config.frog_max_jump_distance = 7
     fp = FrogPond(self.config)
     # act
     fp._set_constraints()
     # assert
     assert Frog.max_range == 7
コード例 #2
0
ファイル: test_frog_pond.py プロジェクト: hellicott/FrogPond
 def test_set_constraints_sets_pond_radius(self):
     # arrange
     self.config.pond_radius = 10
     fp = FrogPond(self.config)
     # act
     fp._set_constraints()
     # assert
     assert Pond.radius == 10
コード例 #3
0
ファイル: test_frog_pond.py プロジェクト: hellicott/FrogPond
 def test_set_constraints_sets_lilly_pad_max_radius(self):
     # arrange
     self.config.lilly_pad_radius_max_percentage_of_pond_size = 10
     self.config.pond_radius = 100
     fp = FrogPond(self.config)
     # act
     fp._set_constraints()
     # assert
     assert LillyPad.max_radius == 10
コード例 #4
0
ファイル: test_frog_pond.py プロジェクト: hellicott/FrogPond
 def test_set_constraints_sets_lilly_pad_min_radius(self):
     # arrange
     min_percent = 2
     self.config.pond_radius = 100
     fp = FrogPond(self.config)
     # act
     fp._set_constraints()
     # assert
     assert LillyPad.min_radius == min_percent