Skip to content

Commit 9ede3eb

Browse files
committed
Attempt to cover / exclude ABC lines
1 parent 562bfee commit 9ede3eb

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

axelrod/evolvable_player.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,22 +48,22 @@ def deserialize_parameters(cls, serialized):
4848

4949
def mutate(self):
5050
"""Optional method to allow Player to produce a variant (not in place)."""
51-
pass
51+
pass # pragma: no cover
5252

5353
def crossover(self, other):
5454
"""Optional method to allow Player to produce variants in combination with another player. Returns a new
5555
Player."""
56-
pass
56+
pass # pragma: no cover
5757

5858
# Optional methods for particle swarm algorithm.
5959

6060
def receive_vector(self, vector):
6161
"""Receive a vector of params and overwrite the Player."""
62-
pass
62+
pass # pragma: no cover
6363

6464
def create_vector_bounds(self):
6565
"""Creates the bounds for the decision variables for Particle Swarm Algorithm."""
66-
pass
66+
pass # pragma: no cover
6767

6868

6969
def copy_lists(lists: List[List]) -> List[List]:

axelrod/tests/strategies/test_evolvable_player.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,8 @@ def test_randomization(self):
8484
player2 = self.player()
8585
if player1 != player2:
8686
return
87-
self.assertFalse(True)
87+
# Should never get here unless a change breaks the test, so don't include in coverage.
88+
self.assertFalse(True) # pragma: no cover
8889

8990
def test_mutate_variations(self):
9091
"""Test that mutate produces different strategies."""
@@ -122,7 +123,8 @@ def test_crossover(self):
122123
crossed = player1.crossover(player2)
123124
if player1 != crossed and player2 != crossed and crossed == crossed.clone():
124125
return
125-
self.assertFalse(True)
126+
# Should never get here unless a change breaks the test, so don't include in coverage.
127+
self.assertFalse(True) # pragma: no cover
126128

127129
def test_crossover_mismatch(self):
128130
other = axl.Cooperator()

0 commit comments

Comments
 (0)