[tor-commits] [stem/master] Test website example code

atagar at torproject.org atagar at torproject.org
Fri Oct 2 23:16:05 UTC 2020


commit 26bf1bb49540c86751e20f133e7c906af92ea742
Merge: ab835c1a e1137067
Author: Damian Johnson <atagar at torproject.org>
Date:   Fri Oct 2 16:00:11 2020 -0700

    Test website example code
    
    Most examples lacked test coverage. We tested some in 2012 (tutorial.py) and
    2014 (tutorial_examples.py), but they weren't updated as new code got added.
    
    Aside from testing and fixing just about everything, this branch asserts that
    new examples have test coverage so we stay atop this.

 .../example/benchmark_server_descriptor_stem.py    |    2 +
 docs/_static/example/benchmark_stem.py             |   15 +-
 docs/_static/example/check_digests.py              |   19 +-
 docs/_static/example/client_usage_using_pycurl.py  |   10 +-
 .../_static/example/client_usage_using_socksipy.py |    6 +-
 docs/_static/example/compare_flags.py              |    2 +-
 docs/_static/example/create_descriptor.py          |    4 +-
 docs/_static/example/create_descriptor_content.py  |    2 +-
 docs/_static/example/current_descriptors.py        |    4 +-
 docs/_static/example/custom_path_selection.py      |    7 +-
 docs/_static/example/descriptor_from_orport.py     |    4 +-
 .../example/descriptor_from_tor_control_socket.py  |    2 +-
 docs/_static/example/download_descriptor.py        |   13 +-
 docs/_static/example/ephemeral_hidden_services.py  |    6 +-
 docs/_static/example/event_listening.py            |   48 +-
 docs/_static/example/exit_used.py                  |   17 +-
 docs/_static/example/fibonacci_multiprocessing.py  |   23 +-
 docs/_static/example/fibonacci_threaded.py         |   29 +-
 docs/_static/example/hello_world.py                |    6 +-
 docs/_static/example/list_circuits.py              |    6 +-
 docs/_static/example/load_test.py                  |   25 -
 docs/_static/example/manual_config_options.py      |    7 +-
 docs/_static/example/outdated_relays.py            |   10 +-
 .../persisting_a_consensus_with_parse_file.py      |    2 +-
 docs/_static/example/reading_twitter.py            |   49 +-
 docs/_static/example/relay_connections.py          |   10 +-
 .../example/resuming_ephemeral_hidden_service.py   |    6 +-
 docs/_static/example/running_hidden_service.py     |    8 +-
 .../example/saving_and_loading_descriptors.py      |    2 +-
 docs/_static/example/tor_descriptors.py            |    7 +-
 docs/_static/example/utilities.py                  |    8 +-
 .../example/votes_by_bandwidth_authorities.py      |    2 +-
 docs/_static/example/words_with.py                 |   12 +-
 docs/tutorials/mirror_mirror_on_the_wall.rst       |    3 -
 docs/tutorials/to_russia_with_love.rst             |    2 +-
 stem/connection.py                                 |    2 +-
 stem/descriptor/__init__.py                        |    3 +
 stem/descriptor/server_descriptor.py               |   10 +-
 stem/manual.py                                     |    2 +-
 stem/response/events.py                            |    4 +
 test/settings.cfg                                  |    4 +-
 test/task.py                                       |    1 +
 test/unit/__init__.py                              |   11 -
 test/unit/doctest.py                               |    4 +-
 test/unit/examples.py                              | 1052 ++++++++++++++++++++
 test/unit/tutorial.py                              |  215 ----
 test/unit/tutorial_examples.py                     |  319 ------
 47 files changed, 1270 insertions(+), 735 deletions(-)



More information about the tor-commits mailing list