[py-svn] r68572 - py/extradoc/talk/pycon-us-2010/tutorial
hpk at codespeak.net
hpk at codespeak.net
Sat Oct 17 10:38:02 CEST 2009
Author: hpk
Date: Sat Oct 17 10:38:01 2009
New Revision: 68572
Added:
py/extradoc/talk/pycon-us-2010/tutorial/hybrid-python.txt
- copied, changed from r68568, py/extradoc/talk/pycon-us-2010/tutorial/proposal-execnet.txt
py/extradoc/talk/pycon-us-2010/tutorial/pytest-I-rapidtesting.txt
- copied, changed from r68568, py/extradoc/talk/pycon-us-2010/tutorial/proposal-pytest-begin.txt
py/extradoc/talk/pycon-us-2010/tutorial/pytest-II-advanced.txt
- copied, changed from r68568, py/extradoc/talk/pycon-us-2010/tutorial/proposal-pytest-advanced.txt
Removed:
py/extradoc/talk/pycon-us-2010/tutorial/proposal-execnet.txt
py/extradoc/talk/pycon-us-2010/tutorial/proposal-pytest-advanced.txt
py/extradoc/talk/pycon-us-2010/tutorial/proposal-pytest-begin.txt
Log:
finalizing tutorials
Copied: py/extradoc/talk/pycon-us-2010/tutorial/hybrid-python.txt (from r68568, py/extradoc/talk/pycon-us-2010/tutorial/proposal-execnet.txt)
==============================================================================
--- py/extradoc/talk/pycon-us-2010/tutorial/proposal-execnet.txt (original)
+++ py/extradoc/talk/pycon-us-2010/tutorial/hybrid-python.txt Sat Oct 17 10:38:01 2009
@@ -12,13 +12,16 @@
Holger Krekel is a co-founder of the PyPy Python Interpreter project.
He is the initiator and maintainer of the popular py.test and other
-tools. In 2004 he founded merlinux, a company focusing on tools
-and practises for Python environments. Holger has spoken at many
-EuroPython and PyCon confereces and gave well received testing
-tutorials at the last Pycon-US 2009 and several European
-conferences.
-
-Tutorial Summary:
+tools. In 2004 he founded merlinux, a company focusing on productive
+Python environments environments. Holger has spoken at many
+EuroPython and PyCon conferences and gave well received testing
+tutorials at Pycon 2009 and several European conferences. He has
+also co-ordinated many sprints, teached CS courses and
+and enjoys interacting with an interested learning group.
+
+===============================
+Tutorial Summary
+===============================
Want to use Python3 in a Python2 environment? Jython together
with CPython? Or execute some user code in a PyPy sandbox for
@@ -30,26 +33,37 @@
.. _execnet: http://codespeak.net/execnet
+===============================
+outline for review
+===============================
+this is a new tutorial, also relates to my invited talk here:
+http://us.pycon.org/2010/conference/keynotes/
+
+
Overview Python Interpreters (10 minutes)
----------------------------------------------
- CPython 2.4, 2.5, 2.6: the mainstream
-- CPython 3.1, PyPy: the future
- Jython 2.5.1: the Java world
- IronPython 2.6: the .NET world
+- CPython 3.1, PyPy: the future
execnet basics (10 minutes)
-------------------------------
-- cross connect Interpreters and platforms
-- zero-install deployment
-- local communication protocols
+- instantiating gateways between Interpreters
+- remote execution of code
+- exchanging structured data
installation (20 minutes)
------------------------------
-- exercise: install execnet and write a simple
- one sub interpreter example
+- zero-install principles
+- self-bootstrapping
+
+exercise:
+install execnet and write a simple
+one sub interpreter example
exchanging data (30 minutes)
-------------------------------
@@ -60,7 +74,7 @@
- working with callbacks
- working with queues and multiple interpreters
-freestyle exercises and questions
+exercise: play with examples for each mode
python2/python3 interactions (20 minutes)
------------------------------------------------
@@ -75,11 +89,12 @@
Break
------------------------------------------------
-Using Jython <-> CPython (15 minutes)
+Using Jython <-> CPython (20 minutes)
------------------------------------------------
interactive examples:
- accessing Java libraries from CPython 2 or 3
+- accessing C# classes from CPython 2 or 3
- accessing CPython extensions from Jython
Writing and testing local protocols (30 minutes)
@@ -90,11 +105,18 @@
exercise: write a remote file server
-Interacting with PyPy sandboxing (30 minutes)
+Interacting with PyPy sandboxing (20 minutes)
-----------------------------------------------------
-interactive walk through:
+joint interactive walk through:
- Basics of PyPy sandboxing
- running a PyPy sandbox
- setting memory and CPU limits
- using remote_exec into a PyPy sandbox
+
+conclusion (10 minutes)
+-----------------------------------------------------
+
+- summary
+- outlook
+- feedback session
Deleted: /py/extradoc/talk/pycon-us-2010/tutorial/proposal-execnet.txt
==============================================================================
--- /py/extradoc/talk/pycon-us-2010/tutorial/proposal-execnet.txt Sat Oct 17 10:38:01 2009
+++ (empty file)
@@ -1,100 +0,0 @@
-Title: Writing hybrid apps with C/J/PyPy Python interpreters
-Presenter: Holger Krekel <holger at merlinux.eu>
-Tutorial format: interactive lecture
-Recording: I give permission to record and publish my PyCon tutorial for free distribution.
-Intended Audience: advanced Python programmers
-Maximum number of students: maybe 30
-Perequisites/knowledge: having worked with two different Python versions or interpreters
-Requirements: Laptop with as many different Python interpreters as you can install on it,
-VirtualBox, Parallels or other VM tech is a plus.
-
-Presenter bio:
-
-Holger Krekel is a co-founder of the PyPy Python Interpreter project.
-He is the initiator and maintainer of the popular py.test and other
-tools. In 2004 he founded merlinux, a company focusing on tools
-and practises for Python environments. Holger has spoken at many
-EuroPython and PyCon confereces and gave well received testing
-tutorials at the last Pycon-US 2009 and several European
-conferences.
-
-Tutorial Summary:
-
-Want to use Python3 in a Python2 environment? Jython together
-with CPython? Or execute some user code in a PyPy sandbox for
-maximum security? In this highly interactive tutorial you'll learn
-about execnet_, a lean package to write and deploy hybrid applications
-in Python. We'll discuss basic ad-hoc deployment, elastic remote execution
-concepts and do basic exercises for writing cross-interpreter applications.
-We'll end with discussing learnings and potential future directions.
-
-.. _execnet: http://codespeak.net/execnet
-
-Overview Python Interpreters (10 minutes)
-----------------------------------------------
-
-- CPython 2.4, 2.5, 2.6: the mainstream
-- CPython 3.1, PyPy: the future
-- Jython 2.5.1: the Java world
-- IronPython 2.6: the .NET world
-
-execnet basics (10 minutes)
--------------------------------
-
-- cross connect Interpreters and platforms
-- zero-install deployment
-- local communication protocols
-
-installation (20 minutes)
-------------------------------
-
-- exercise: install execnet and write a simple
- one sub interpreter example
-
-exchanging data (30 minutes)
--------------------------------
-
-interactive examples:
-
-- working with channel send/receive
-- working with callbacks
-- working with queues and multiple interpreters
-
-freestyle exercises and questions
-
-python2/python3 interactions (20 minutes)
-------------------------------------------------
-
-- string / byte differences
-- syntax differences
-- stream encoding
-
-exercise: run code in python2 from python3 and vice versa
-
-------------------------------------------------
-Break
-------------------------------------------------
-
-Using Jython <-> CPython (15 minutes)
-------------------------------------------------
-
-interactive examples:
-- accessing Java libraries from CPython 2 or 3
-- accessing CPython extensions from Jython
-
-Writing and testing local protocols (30 minutes)
-------------------------------------------------
-
-- the command pattern
-- testing each side of communication
-
-exercise: write a remote file server
-
-Interacting with PyPy sandboxing (30 minutes)
------------------------------------------------------
-
-interactive walk through:
-- Basics of PyPy sandboxing
-- running a PyPy sandbox
-- setting memory and CPU limits
-- using remote_exec into a PyPy sandbox
Deleted: /py/extradoc/talk/pycon-us-2010/tutorial/proposal-pytest-advanced.txt
==============================================================================
--- /py/extradoc/talk/pycon-us-2010/tutorial/proposal-pytest-advanced.txt Sat Oct 17 10:38:01 2009
+++ (empty file)
@@ -1,121 +0,0 @@
-Title: py.test II - cross-platform and distributed testing
-Presenter: Holger Krekel <holger at merlinux.eu>
-Tutorial format: interactive lecture
-Recording: I give permission to record and publish my PyCon tutorial for free distribution.
-Intended Audience: Python programmers
-Maximum number of students: 30
-Perequisites/knowledge: good knowledge of python programming, basic familiarity with automated testing
-Requirements: Laptops with Python and py.test installed
-Notes to reviewer: visting Part I, the beginner-oriented tutorial "rapid testing with minimal effort" is recommended, not required. This version of this advanced tutorial will be an improved version
-of what was given at Pycon 2009, see http://www.scribd.com/doc/21183340/Pycon2009-Pytest-Advanced
-
-Tutorial Summary:
-
-Want to know more about advanced automated testing with Python?
-This tutorial provides in-depth information on advanced usages
-of the popular py.test tool. We show best practises for
-managing test function arguments and generating multiple test calls
-from specifications. We'll introduce writing of project-specific
-extensions and showcase existing one for integration
-with Continous Integration systems. We discuss ways of
-distributing tests across CPUs and platforms, dive deeper into
-managing test function arguments and will leave time
-to discuss and tackle specific scenarios brought up during the session.
-We conclude with a brief look on other testing tools, running traditional
-unittests and doctests and do a Q&A session on other plugins.
-
-Outline for review:
-
-Intro and Terminology (20 mins)
-----------------------------------------
-
-- small/medium/big tests aka unit/integration/functional
-- developer and customer tests
-- py.test overview and basic usage
-
-Extension basics (10 mins)
-----------------------------------------
-
-interactive lecture:
-- what are plugins
-- how to do conftest.py files
-- what are hooks
-
-Python test functions (10 mins)
-------------------------------------
-
-interactive lecture:
-- test functions and classes
-- test function arguments and factory lookup
-- example: monkeypatch funcarg
-
-Generating tests (30 mins)
-------------------------------------
-
-interactive lecture:
-- the pytest_generate_tests hook
-- parametrization schemes
-- py.test's mark mechanism
-
-exercise: write test functions and invoke
-them with different values, specified via
-the 'mark' decorator.
-
-funcarg request objects (30 mins)
-------------------------------------
-
-- caching complex values
-- setup/teardown mechanism
-- skipping tests from factories
-
-exercise: extend previous code to use
-caching, write test functions and invoke
-them with different values, specified via
-the 'mark' decorator.
-
-
-------------------------------------
-break
-------------------------------------
-
-distributed testing (20 mins)
----------------------------------------
-
-- distribution model
-- load-balance testing
-- multi-platform/interpreter testing
-
-advanced testing modes (20 mins)
----------------------------------------
-
-- continuously looping on failing tests
-- protecting against crashing interpreters
-- integrating nose/unittests style tests
-
-exercise: use the modes/styles with your code
-
-using funcargs (20 mins)
------------------------------------------------
-
-- monkeypatch funcarg
-- tempdir for creating per-test filesystem setup
-- recwarn for assertions about warnings
-
-exercise: use the funcargs with your code
-
-using extensions (20 mins)
------------------------------------------------
-
-- integrate collection/run of traditional unit-tests
-- testing ReST syntax
-- running Javascript tests
-- producing xml/log files for buildbod/CruiseControl
-
-exercise: install/use the extensions
-
-feedback / Q&A (10 mins)
------------------------------------------------
-
-feedback round and general Q&A
-
-
Deleted: /py/extradoc/talk/pycon-us-2010/tutorial/proposal-pytest-begin.txt
==============================================================================
--- /py/extradoc/talk/pycon-us-2010/tutorial/proposal-pytest-begin.txt Sat Oct 17 10:38:01 2009
+++ (empty file)
@@ -1,139 +0,0 @@
-Title: py.test I - rapid testing with minimal effort
-Presenter: Holger Krekel <holger at merlinux.eu>
-Tutorial format: interactive lecture
-Recording: I give permission to record and publish my PyCon tutorial for free distribution.
-Intended Audience: beginner programmers
-Maximum number of students: maybe 30
-Perequisites/knowledge: basic knowledge of python programming
-Requirements: Laptop with Python 2.4 or greater installed. Pairing welcome.
-
-
-Presenter bio:
-
-Holger Krekel is a co-founder of the PyPy Python Interpreter project.
-He is the initiator and maintainer of the popular py.test and other
-tools. In 2004 he founded merlinux, a company focusing on tools
-and practises for Python environments. Holger has spoken at many
-EuroPython and PyCon confereces and gave well received testing
-tutorials at the last Pycon-US 2009 and several European
-conferences.
-
-Tutorial Summary:
-
-Want to learn writing tests in Python? This tutorial introduces
-basic practises using the popular py.test (http://pytest.org) tool.
-We start with an overview on testing and tools in Python and then discuss
-and exercise basic idioms in a step-by-step manner. We cover the basic
-writing, organisation and running of tests and debugging options.
-In the second part we discuss setup and teardown of test state, usage
-and configuration of test functions arguments and introduce coverage testing.
-We will close with time to answer questions and discuss topics from the participants.
-
-
-Motivation and testing terms (15 minutes)
--------------------------------------------------------
-
-- why automated testing
-- testing types
-- basic test organisation
-
-Installation. (15 minutes)
----------------------------------------------------------
-
-exercise:
-- installation
-- basic test discovery
-- writing and running simple test functions
-
-Basic usage of py.test (15 minutes)
-------------------------------------------
-
-interactive lecture:
-- reinterpretation of asserts
-- asserting exceptions
-- debugging options, pdb
-
-test function arguments (15)
---------------------------------
-
-interactive lecture:
-- creating values for test functions
-- understanding setup and teardown
-- using helpers of the funcarg request object
-
-
-application scenario setup (30)
---------------------------------
-
-exercise: implement the testing "mysetup" pattern
-- separate test setup and test code
-
---------------------------------
-Break
---------------------------------
-
-marking tests (15)
-----------------------------------
-
-interactive lecture:
-- marking tests for skip and xfail
-- marking classes and modules
-- selectively running tests
-
-hooks and plugins (15)
---------------------------------
-
-interactive lecture:
-- conftest plugins
-- plugin discovery
-- pytest hook functions
-
-new command line option (15)
-----------------------------------
-
-exercise:
-- add a new cmdline option for the "mysetup" setup object
-- skip test depending on a cmdline option
-
-mocking and monkeypatching (15)
-----------------------------------
-
-interactive lecture:
-- when do you need monkeypatching?
-- the monkeypatch funcarg
-exercise: test code involving os.getpwd() handling
-
-coverage testing (15)
-----------------------------------
-
-- figleaf and coverage tools
-- installing figleaf or coverage
-- exercise: get html coverage for your code
-
-overview on advanced usages (15)
----------------------------------------
-
-interactive lecture:
-- looponfailing
-- distributed testing (part II)
-- generative tests (part II)
-- doctests (part II)
-- javascript testing
-
-
-Notes for reviewers:
-This version of the tutorial will be an improved version
-of what was given at Pycon 2009, see also:
-
-http://tinyurl.com/yjluwwy
-http://www.scribd.com/doc/21183340/Pycon2009-Pytest-Advanced
-
-Previous speaking/teaching experience:
-
-Holger:
-I have talked at numerous Pycon and EuroPython conferences about
-PyPy and testing tools. In 2009 i started giving well received
-testing tutorials at Pycon US, EuroPython and Pycon UK. I've
-also co-ordinated many sprints, gave teaching lectures
-at university about computer science and generally enjoy
-interacting with an interested learning group.
Copied: py/extradoc/talk/pycon-us-2010/tutorial/pytest-I-rapidtesting.txt (from r68568, py/extradoc/talk/pycon-us-2010/tutorial/proposal-pytest-begin.txt)
==============================================================================
--- py/extradoc/talk/pycon-us-2010/tutorial/proposal-pytest-begin.txt (original)
+++ py/extradoc/talk/pycon-us-2010/tutorial/pytest-I-rapidtesting.txt Sat Oct 17 10:38:01 2009
@@ -1,4 +1,6 @@
-Title: py.test I - rapid testing with minimal effort
+py.test I - rapid testing with minimal effort
+---------------------------------------------------
+
Presenter: Holger Krekel <holger at merlinux.eu>
Tutorial format: interactive lecture
Recording: I give permission to record and publish my PyCon tutorial for free distribution.
@@ -12,13 +14,16 @@
Holger Krekel is a co-founder of the PyPy Python Interpreter project.
He is the initiator and maintainer of the popular py.test and other
-tools. In 2004 he founded merlinux, a company focusing on tools
-and practises for Python environments. Holger has spoken at many
-EuroPython and PyCon confereces and gave well received testing
-tutorials at the last Pycon-US 2009 and several European
-conferences.
+tools. In 2004 he founded merlinux, a company focusing on productive
+Python environments environments. Holger has spoken at many
+EuroPython and PyCon conferences and gave well received testing
+tutorials at Pycon 2009 and several European conferences. He has
+also co-ordinated many sprints, teached CS courses and
+and enjoys interacting with an interested learning group.
+===============================
Tutorial Summary:
+===============================
Want to learn writing tests in Python? This tutorial introduces
basic practises using the popular py.test (http://pytest.org) tool.
@@ -29,6 +34,22 @@
and configuration of test functions arguments and introduce coverage testing.
We will close with time to answer questions and discuss topics from the participants.
+===============================
+Notes for reviewers:
+===============================
+This version of the tutorial will be an improved version
+of what was given at Pycon 2009, see also:
+http://tinyurl.com/yjluwwy
+http://www.scribd.com/doc/21183340/Pycon2009-Pytest-Advanced
+
+
+===============================
+outline for review:
+===============================
+
+where not noted otherwise I'll present the contents
+in a highly interactive manner.
+
Motivation and testing terms (15 minutes)
-------------------------------------------------------
@@ -65,8 +86,9 @@
application scenario setup (30)
--------------------------------
-exercise: implement the testing "mysetup" pattern
-- separate test setup and test code
+exercise: separate your test setup and test code and
+implement the "mysetup" testing pattern
+
--------------------------------
Break
@@ -88,29 +110,21 @@
- plugin discovery
- pytest hook functions
-new command line option (15)
+new command line option (20)
----------------------------------
exercise:
- add a new cmdline option for the "mysetup" setup object
- skip test depending on a cmdline option
-mocking and monkeypatching (15)
-----------------------------------
-
-interactive lecture:
-- when do you need monkeypatching?
-- the monkeypatch funcarg
-exercise: test code involving os.getpwd() handling
-
-coverage testing (15)
+coverage testing (20)
----------------------------------
- figleaf and coverage tools
- installing figleaf or coverage
- exercise: get html coverage for your code
-overview on advanced usages (15)
+overview on advanced usages (10)
---------------------------------------
interactive lecture:
@@ -120,20 +134,8 @@
- doctests (part II)
- javascript testing
+conclusion (10 mins)
+-----------------------------------------------------
-Notes for reviewers:
-This version of the tutorial will be an improved version
-of what was given at Pycon 2009, see also:
-
-http://tinyurl.com/yjluwwy
-http://www.scribd.com/doc/21183340/Pycon2009-Pytest-Advanced
-
-Previous speaking/teaching experience:
-
-Holger:
-I have talked at numerous Pycon and EuroPython conferences about
-PyPy and testing tools. In 2009 i started giving well received
-testing tutorials at Pycon US, EuroPython and Pycon UK. I've
-also co-ordinated many sprints, gave teaching lectures
-at university about computer science and generally enjoy
-interacting with an interested learning group.
+- summary
+- feedback session
Copied: py/extradoc/talk/pycon-us-2010/tutorial/pytest-II-advanced.txt (from r68568, py/extradoc/talk/pycon-us-2010/tutorial/proposal-pytest-advanced.txt)
==============================================================================
--- py/extradoc/talk/pycon-us-2010/tutorial/proposal-pytest-advanced.txt (original)
+++ py/extradoc/talk/pycon-us-2010/tutorial/pytest-II-advanced.txt Sat Oct 17 10:38:01 2009
@@ -1,4 +1,7 @@
-Title: py.test II - cross-platform and distributed testing
+
+Title: py.test II - advanced cross-platform and distributed testing
+-------------------------------------------------------------
+
Presenter: Holger Krekel <holger at merlinux.eu>
Tutorial format: interactive lecture
Recording: I give permission to record and publish my PyCon tutorial for free distribution.
@@ -6,10 +9,28 @@
Maximum number of students: 30
Perequisites/knowledge: good knowledge of python programming, basic familiarity with automated testing
Requirements: Laptops with Python and py.test installed
-Notes to reviewer: visting Part I, the beginner-oriented tutorial "rapid testing with minimal effort" is recommended, not required. This version of this advanced tutorial will be an improved version
-of what was given at Pycon 2009, see http://www.scribd.com/doc/21183340/Pycon2009-Pytest-Advanced
-Tutorial Summary:
+Notes to reviewer
+
+visting Part I, the beginner-oriented tutorial "rapid testing with minimal effort", is recommended
+if you haven't been exposed to testing practises in Python. The below outlined version of this
+advanced tutorial will be an improved version of what I gave at Pycon 2009, see
+http://www.scribd.com/doc/21183340/Pycon2009-Pytest-Advanced
+
+Presenter bio:
+
+Holger Krekel is a co-founder of the PyPy Python Interpreter project.
+He is the initiator and maintainer of the popular py.test and other
+tools. In 2004 he founded merlinux, a company focusing on productive
+Python environments environments. Holger has spoken at many
+EuroPython and PyCon conferences and gave well received testing
+tutorials at Pycon 2009 and several European conferences. He has
+also co-ordinated many sprints, teached CS courses and
+and enjoys interacting with an interested learning group.
+
+===============================
+Tutorial Summary
+===============================
Want to know more about advanced automated testing with Python?
This tutorial provides in-depth information on advanced usages
@@ -24,7 +45,9 @@
We conclude with a brief look on other testing tools, running traditional
unittests and doctests and do a Q&A session on other plugins.
-Outline for review:
+===============================
+Outline for review
+===============================
Intro and Terminology (20 mins)
----------------------------------------
@@ -49,7 +72,7 @@
- test function arguments and factory lookup
- example: monkeypatch funcarg
-Generating tests (30 mins)
+Generating tests (20 mins)
------------------------------------
interactive lecture:
@@ -61,7 +84,7 @@
them with different values, specified via
the 'mark' decorator.
-funcarg request objects (30 mins)
+funcarg request objects (20 mins)
------------------------------------
- caching complex values
@@ -73,6 +96,13 @@
them with different values, specified via
the 'mark' decorator.
+mocking and monkeypatching (10)
+----------------------------------
+
+interactive demo:
+- when do you need monkeypatching?
+- the monkeypatch funcarg
+
------------------------------------
break
More information about the pytest-commit
mailing list