Skip to content

Commit e83c8f7

Browse files
committed
Silence warnings on initialization.
1 parent f676025 commit e83c8f7

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

axelrod/__init__.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
DEFAULT_TURNS = 200
22

3+
# We allow behavior at initialization that we don't want users to do.
4+
import warnings
5+
warnings.simplefilter('ignore', category=UserWarning)
6+
37
# The order of imports matters!
48
from axelrod.version import __version__
59
from axelrod.load_data_ import load_pso_tables, load_weights
@@ -22,3 +26,5 @@
2226
from axelrod.result_set import ResultSet
2327
from axelrod.ecosystem import Ecosystem
2428
from axelrod.fingerprint import AshlockFingerprint, TransitiveFingerprint
29+
30+
warnings.simplefilter('default', category=UserWarning)

0 commit comments

Comments
 (0)