Skip to content

Commit

Permalink
Merge pull request #55 from fastfuse/feature/updates
Browse files Browse the repository at this point in the history
updates in -m section; venv and doctest added
  • Loading branch information
shabda committed Aug 28, 2018
2 parents 46a3067 + 59e1d6a commit c3135ff
Showing 1 changed file with 35 additions and 2 deletions.
37 changes: 35 additions & 2 deletions modules.rst
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,45 @@ Debugging emails
-------------------
.. code-block:: bash
$python -m smtpd -n -c DebuggingServer localhost:1025
$ python -m smtpd -n -c DebuggingServer localhost:1025
Profiling scripts
----------------------

.. code-block:: bash
$python -m cProfile scriptname.py
$ python -m cProfile scriptname.py
Creating virtual environments
------------------------------
.. code-block:: bash
$ python -m venv venv_name
Running doctests
------------------------------
Assuming you have my_functions.py with next content:

.. code-block:: python
def is_palindrome(text):
"""
Check if input text is palindrome
>>> is_palindrome('eye')
True
>>> is_palindrome('tree')
False
"""
return text == text[::-1]
To run doctests:

.. code-block:: bash
$ python -m doctest my_functions.py

0 comments on commit c3135ff

Please sign in to comment.