~ahayzen/volleyball2d/ai-angle-and-concentration

« back to all changes in this revision

Viewing changes to tests/autopilot/volleyball2d/test_settings.py

  • Committer: Andrew Hayzen
  • Date: 2014-12-16 23:46:08 UTC
  • Revision ID: ahayzen@gmail.com-20141216234608-03i1rrfyzvvtczse
* Add sensitivity option
* Stop double jump bug
* Changes to the game header

Show diffs side-by-side

added added

removed removed

Lines of Context:
48
48
                        Eventually(Equals(True)))
49
49
        self.assertThat(self.settings.get_motion_deadzone_value(),
50
50
                        Eventually(Equals(3)))
 
51
        self.assertThat(self.settings.get_motion_sensitivity_value(),
 
52
                        Eventually(Equals(0.75)))
51
53
        self.assertThat(self.settings.get_ai_debug_state(),
52
54
                        Eventually(Equals(False)))
53
55
 
97
99
                        Eventually(Equals(INSTRUCTION_MOTION_STR)))
98
100
 
99
101
    @switch_to_settings_page
100
 
    def test_switch_motion_disables_deadzone(self):
101
 
        """Test the deadzone option is disabled when motion is disabled"""
 
102
    def test_switch_motion_disables_options(self):
 
103
        """Test the options are disabled when motion is disabled"""
102
104
 
103
105
        # Enable motion
104
106
        self.settings.set_motion_switch_state(True)
105
107
        self.assertThat(self.settings.get_motion_deadzone_listitem().enabled,
106
108
                        Eventually(Equals(True)))
 
109
        self.assertThat(self.settings.get_motion_sensitivity_listitem()
 
110
                        .enabled, Eventually(Equals(True)))
107
111
 
108
112
        # Disable motion
109
113
        self.settings.set_motion_switch_state(False)
110
114
        self.assertThat(self.settings.get_motion_deadzone_listitem().enabled,
111
115
                        Eventually(Equals(False)))
 
116
        self.assertThat(self.settings.get_motion_sensitivity_listitem()
 
117
                        .enabled, Eventually(Equals(False)))
112
118
 
113
119
        # Enable motion
114
120
        self.settings.set_motion_switch_state(True)
115
121
        self.assertThat(self.settings.get_motion_deadzone_listitem().enabled,
116
122
                        Eventually(Equals(True)))
 
123
        self.assertThat(self.settings.get_motion_sensitivity_listitem()
 
124
                        .enabled, Eventually(Equals(True)))