aboutsummaryrefslogtreecommitdiff
path: root/diplomacy/tests/network/run_real_game.py
diff options
context:
space:
mode:
authorPhilip Paquette <pcpaquette@gmail.com>2019-09-11 12:58:45 -0400
committerPhilip Paquette <pcpaquette@gmail.com>2019-09-14 18:18:53 -0400
commitabb42dcd4886705d6ba8af27f68ef605218ac67c (patch)
tree9ae16f7a09fff539fa72e65198e284bca6ac3376 /diplomacy/tests/network/run_real_game.py
parenta954a00d263750c279dbb2c0a9ae85707022bcd7 (diff)
Added ReadtheDocs documentation for the public API
- Reformatted the docstring to be compatible - Added tests to make sure the documentation compiles properly - Added sphinx as a pip requirement Co-authored-by: Philip Paquette <pcpaquette@gmail.com> Co-authored-by: notoraptor <stevenbocco@gmail.com>
Diffstat (limited to 'diplomacy/tests/network/run_real_game.py')
-rw-r--r--diplomacy/tests/network/run_real_game.py28
1 files changed, 19 insertions, 9 deletions
diff --git a/diplomacy/tests/network/run_real_game.py b/diplomacy/tests/network/run_real_game.py
index a9800b6..e243dec 100644
--- a/diplomacy/tests/network/run_real_game.py
+++ b/diplomacy/tests/network/run_real_game.py
@@ -18,17 +18,27 @@
""" Run tests from diplomacy.tests.network.test_real_game to test games in a real environment.
Each test run a game and checks game messages and phases against an expected game data file.
Current tested gama data files are JSON files located into folder diplomacy/tests/network:
- 1.json
- 2.json
- 3.json
- Need a local diplomacy server running. You must specify this server port using parameter --port=<server_port>.
- To run all tests:
+
+ - 1.json
+ - 2.json
+ - 3.json
+
+ Need a local diplomacy server running. You must specify
+ this server port using parameter ``--port=<server_port>``.
+
+ To run all tests: ::
+
python -m diplomacy.tests.network.run_real_game --port=<server_port>
- To run a specific test (e.g. 2.json, or 2.json and 1.json):
- python -m diplomacy.tests.network.run_real_game --cases=20 --port=<server_port>
- python -m diplomacy.tests.network.run_real_game --cases=15,20 --port=<server_port>
- For help:
+
+ To run a specific test (e.g. 2.json, or 2.json and 1.json): ::
+
+ python -m diplomacy.tests.network.run_real_game --cases=2 --port=<server_port>
+ python -m diplomacy.tests.network.run_real_game --cases=1,2 --port=<server_port>
+
+ For help: ::
+
python -m diplomacy.tests.network.run_real_game --help
+
"""
import argparse
from tornado import gen