← Back to team overview

duplicity-team team mailing list archive

[Merge] lp:~aaron-whitehouse/duplicity/improve_tox_and_python2-6_testing into lp:duplicity

 

Aaron Whitehouse has proposed merging lp:~aaron-whitehouse/duplicity/improve_tox_and_python2-6_testing into lp:duplicity.

Requested reviews:
  duplicity-team (duplicity-team)

For more details, see:
https://code.launchpad.net/~aaron-whitehouse/duplicity/improve_tox_and_python2-6_testing/+merge/266588

Testing improvements, particularly in relation to testing against Python version 2.6:
* tox.ini fixed so that it is possible to run individual tests against both Python 2.6 and 2.7;
* updated test_code.py to use unittest2 for Python versions < 2.7 (instead of failing);
* ./run-tests now correctly runs all tests against both Python 2.6 and 2.7; and
* improved testing directions in README-REPO.
-- 
Your team duplicity-team is requested to review the proposed merge of lp:~aaron-whitehouse/duplicity/improve_tox_and_python2-6_testing into lp:duplicity.
=== modified file 'README'
--- README	2014-10-18 19:44:29 +0000
+++ README	2015-07-31 15:26:15 +0000
@@ -61,6 +61,10 @@
 the class to gpginterface in the hope that package maintainers will stumble
 over it and stop this problematic behaviour for good.
 
+DEVELOPMENT
+
+For more information on downloading duplicity's source code from the
+code repository and developing for duplicity, see README-REPO.
 
 HELP:
 
@@ -70,4 +74,4 @@
 
 or post to the mailing list at
 
-  http://mail.nongnu.org/mailman/listinfo/duplicity-talk/
+  http://mail.nongnu.org/mailman/listinfo/duplicity-talk/
\ No newline at end of file

=== modified file 'README-REPO'
--- README-REPO	2014-09-07 18:41:15 +0000
+++ README-REPO	2015-07-31 15:26:15 +0000
@@ -1,14 +1,17 @@
 REPO README - Notes for people checking out of Launchpad (bzr)
 --------------------------------------------------------------
 
+-------------------------
 Getting duplicity to run:
 -------------------------
 
 By the numbers:
 1) Do the checkout to a location called $DUP_ROOT:
-   bzr branch lp:duplicity $DUP_ROOT   		                  [for the dev branch]
-   or 
-   bzr branch lp:~duplicity-team/duplicity/0.6-releases $DUP_ROOT [for the stable branch]
+   [for the dev branch]
+   bzr branch lp:duplicity $DUP_ROOT
+   or
+   [for the stable branch]
+   bzr branch lp:~duplicity-team/duplicity/0.6-releases $DUP_ROOT
 2) cd $DUP_ROOT/duplicity
 3) Run "python compilec.py" to create _librsync.so
 4) cd ..
@@ -24,7 +27,32 @@
 
 PYTHONPATH=$DUP_ROOT bin/rdiffdir
 
+-----------------------
 Running the unit tests:
 -----------------------
 
 cd testing; ./run-tests
+
+Please run the tests on your branch before proposing a merge, to ensure that
+you have not broken any tests that previously worked.
+
+You can run specific tests using:
+tox -- -s [folder].[folder].[file].[class].[test]
+For example:
+tox -- -s testing.unit.test_selection
+or:
+tox -- -s testing.unit.test_selection.MatchingTest.test_tuple_include
+
+-----------------------------------------
+Testing against multiple Python versions:
+-----------------------------------------
+
+Duplicity currently supports Python versions v2.6 or later. Duplicity uses tox
+to make it easy to test your code against multiple Python versions. Running
+tests using the commands above will automatically test code against
+both Python v2.6 and v2.7, if you have both installed on your system.
+
+For instructions on installing Python v2.6 on newer versions of Ubuntu, see
+https://launchpad.net/~fkrull/+archive/ubuntu/deadsnakes
+
+

=== modified file 'po/duplicity.pot'
--- po/duplicity.pot	2015-07-31 13:59:20 +0000
+++ po/duplicity.pot	2015-07-31 15:26:15 +0000
@@ -8,7 +8,7 @@
 msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
 "Report-Msgid-Bugs-To: Kenneth Loafman <kenneth@xxxxxxxxxxx>\n"
-"POT-Creation-Date: 2015-07-31 08:54-0500\n"
+"POT-Creation-Date: 2015-07-31 16:07+0100\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <LL@xxxxxx>\n"

=== modified file 'testing/run-tests'
--- testing/run-tests	2014-04-20 13:13:19 +0000
+++ testing/run-tests	2015-07-31 15:26:15 +0000
@@ -20,5 +20,4 @@
 # along with duplicity; if not, write to the Free Software Foundation,
 # Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 
-cd $(dirname $(dirname $0))
 tox

=== modified file 'testing/run-tests-ve'
--- testing/run-tests-ve	2014-04-20 13:13:19 +0000
+++ testing/run-tests-ve	2015-07-31 15:26:15 +0000
@@ -20,5 +20,4 @@
 # along with duplicity; if not, write to the Free Software Foundation,
 # Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 
-cd $(dirname $(dirname $0))
 tox

=== modified file 'testing/test_code.py'
--- testing/test_code.py	2015-02-01 17:37:37 +0000
+++ testing/test_code.py	2015-07-31 15:26:15 +0000
@@ -21,7 +21,11 @@
 import os
 import sys
 import subprocess
-import unittest
+
+if sys.version_info < (2, 7):
+    import unittest2 as unittest
+else:
+    import unittest
 
 from . import _top_dir, DuplicityTestCase
 

=== modified file 'tox.ini'
--- tox.ini	2014-11-20 22:20:47 +0000
+++ tox.ini	2015-07-31 15:26:15 +0000
@@ -5,8 +5,11 @@
 setenv=
 	RUN_CODE_TESTS=1
 deps=
-	lockfile
-     	mock
-     	pexpect
+    lockfile
+    mock
+    pexpect
+    unittest2
+# conditional deps (py26: unittest2) don't work on tox <1.8
+
 commands=
-	{envpython} ./setup.py test
+	{envpython} {toxinidir}/setup.py test {posargs}


Follow ups