rpms/python-peak-rules/devel python-peak-rules-doctest.patch, NONE, 1.1 .cvsignore, 1.3, 1.4 python-peak-rules.spec, 1.5, 1.6 sources, 1.3, 1.4

Toshio くらとみ toshio at fedoraproject.org
Tue Dec 2 22:22:05 UTC 2008


Author: toshio

Update of /cvs/pkgs/rpms/python-peak-rules/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv18262

Modified Files:
	.cvsignore python-peak-rules.spec sources 
Added Files:
	python-peak-rules-doctest.patch 
Log Message:

* Tue Dec 2 2008 Toshio Kuratomi <toshio at fedoraproject.org> - 0.5a1.dev-3.2582
- Update to latest development snapshot
- Enable test suite
- Patch so doctests pass


python-peak-rules-doctest.patch:

--- NEW FILE python-peak-rules-doctest.patch ---
diff -up PEAK-Rules-0.5a1.dev-r2581/Criteria.txt.test PEAK-Rules-0.5a1.dev-r2581/Criteria.txt
--- PEAK-Rules-0.5a1.dev-r2581/Criteria.txt.test	2008-12-02 12:47:12.000000000 -0800
+++ PEAK-Rules-0.5a1.dev-r2581/Criteria.txt	2008-12-02 12:53:14.000000000 -0800
@@ -302,8 +302,9 @@ of intersecting them will be a conjuncti
     >>> intersect(float, MySet([int, str]))
     MySet([<type 'float'>, <type 'int'>, <type 'str'>])
 
-    >>> intersect(MySet([d, c]), MySet([int, str]))
-    MySet([<class 'd'>, <class ...c...>, <type 'str'>])
+    >>> result = intersect(MySet([d, c]), MySet([int, str]))
+    >>> result == MySet([d, c, str])
+    True
 
 If you want to ensure that all items in a set are of appropriate type or value,
 you can override ``__init__`` to do the checking, and raise an appropriate
@@ -974,8 +975,10 @@ will be AST-like structures.)
 
 Creating a test with disjunct criteria actually returns a set of tests::
 
-    >>> Test("x", DisjunctionSet([int, str]))
-    DisjunctionSet([Test('x', <type 'int'>), Test('x', <type 'str'>)])
+    >>> result = Test("x", DisjunctionSet([int, str]))
+    >>> result == DisjunctionSet([Test('x', str),
+    ...     Test('x', int)])
+    True
 
 So the ``disjuncts()`` of a test will always just be the test itself::
 
@@ -991,13 +994,14 @@ intact::
 But if the test criterion is a conjunction or range, negating it can produce
 a disjunction of tests::
 
-    >>> negate(
+    >>> result = negate(
     ...     Test('x',
     ...         NotObjects([IsObject('foo',False), IsObject('bar',False)])
     ...     )
     ... )
-    DisjunctionSet([Test('x', IsObject('foo', True)),
-                    Test('x', IsObject('bar', True))])
+    >>> result == DisjunctionSet([Test('x', IsObject('foo', True)),
+    ...     Test('x', IsObject('bar', True))])
+    True
 
 Intersecting two tests for the same dispatch expression returns a test whose
 criterion is the intersection of the original tests' criteria::
diff -up PEAK-Rules-0.5a1.dev-r2581/Indexing.txt.test PEAK-Rules-0.5a1.dev-r2581/Indexing.txt
--- PEAK-Rules-0.5a1.dev-r2581/Indexing.txt.test	2008-12-02 12:53:33.000000000 -0800
+++ PEAK-Rules-0.5a1.dev-r2581/Indexing.txt	2008-12-02 13:29:28.000000000 -0800
@@ -1083,6 +1083,7 @@ Value Map Generation
 --------------------
 
     >>> from peak.rules.indexing import split_ranges
+    >>> from peak.util.extremes import Min, Max
 
     >>> def dump_ranges(ind, cases):
     ...     exact, ranges = split_ranges(*ind.seed_bits(cases))
@@ -1104,12 +1105,14 @@ Value Map Generation
     ({}, [((Min, Max), [])])
 
     >>> ind.add_case(0, Value(19))
-    >>> dump_ranges(ind, ind.known_cases)
-    ({Min: [], 19: [0]}, [((Min, Max), [])])
+    >>> result = dump_ranges(ind, ind.known_cases)
+    >>> result == ({Min: [], 19: [0]}, [((Min, Max), [])])
+    True
 
     >>> ind.add_case(1, Value(23))
-    >>> dump_ranges(ind, ind.known_cases)
-    ({Min: [], 19: [0], 23: [1]}, [((Min, Max), [])])
+    >>> result = dump_ranges(ind, ind.known_cases)
+    >>> result == ({Min: [], 19: [0], 23: [1]}, [((Min, Max), [])])
+    True
 
     >>> ind.add_case(2, Value(23, False))
     >>> dump_ranges(ind, ind.known_cases)


Index: .cvsignore
===================================================================
RCS file: /cvs/pkgs/rpms/python-peak-rules/devel/.cvsignore,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- .cvsignore	11 Oct 2008 22:33:54 -0000	1.3
+++ .cvsignore	2 Dec 2008 22:21:34 -0000	1.4
@@ -1 +1 @@
-PEAK-Rules-0.5a1.dev-r2581.tar.gz
+PEAK-Rules-0.5a1.dev-r2582.tar.gz


Index: python-peak-rules.spec
===================================================================
RCS file: /cvs/pkgs/rpms/python-peak-rules/devel/python-peak-rules.spec,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- python-peak-rules.spec	29 Nov 2008 15:52:15 -0000	1.5
+++ python-peak-rules.spec	2 Dec 2008 22:21:34 -0000	1.6
@@ -1,13 +1,19 @@
 %{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
 
 %define packagename PEAK-Rules
-%define devrev  2581
+%define devrev  2582
 
 %define docs README.txt AST-Builder.txt Code-Generation.txt Criteria.txt DESIGN.txt Indexing.txt Predicates.txt Syntax-Matching.txt
 
 Name:           python-peak-rules
 Version:        0.5a1.dev
-Release:        2.%{devrev}%{?dist}
+# At earliest opportunity, move all non-numeric information to release.
+# This would be proper:
+# Version: 0.5
+# Release:0.3.a1.dev%{devrev}%{?dist}
+# But we can't do that yet because it breaks the upgrade path.
+# When version hits 0.5.1 or 0.6 we can correct this.
+Release:        3.%{devrev}%{?dist}
 Summary:        Generic functions and business rules support systems
 
 Group:          Development/Languages
@@ -15,11 +21,16 @@
 URL:            http://pypi.python.org/pypi/PEAK-Rules
 Source0:        http://peak.telecommunity.com/snapshots/%{packagename}-%{version}-r%{devrev}.tar.gz
 Patch0:         %{name}-setup.patch
+Patch1:         %{name}-doctest.patch
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 BuildArch:      noarch
 
 BuildRequires:  python-devel
 BuildRequires:  python-setuptools-devel
+BuildRequires:       python-peak-util-assembler >= 0.3
+BuildRequires:       python-peak-util-addons >= 0.6
+BuildRequires:       python-peak-util-extremes >= 1.1
+BuildRequires:       python-decoratortools >= 1.7
 
 Requires:       python-peak-util-assembler >= 0.3
 Requires:       python-peak-util-addons >= 0.6
@@ -37,6 +48,7 @@
 %prep
 %setup -q -n %{packagename}-%{version}-r%{devrev}
 %patch0 -b .setup
+%patch1 -p1 -b .test
 %{__chmod} -x %{docs}
 
 %build
@@ -46,6 +58,9 @@
 rm -rf %{buildroot}
 %{__python} setup.py install --skip-build --root %{buildroot}
 
+%check
+%{__python} setup.py test
+
 %clean
 rm -rf %{buildroot}
 
@@ -55,6 +70,11 @@
 %{python_sitelib}/*
 
 %changelog
+* Tue Dec 2 2008 Toshio Kuratomi <toshio at fedoraproject.org> - 0.5a1.dev-3.2582
+- Update to latest development snapshot
+- Enable test suite
+- Patch so doctests pass
+
 * Sat Nov 29 2008 Ignacio Vazquez-Abrams <ivazqueznet+rpm at gmail.com> - 0.5a1.dev-2.2581
 - Rebuild for Python 2.6
 


Index: sources
===================================================================
RCS file: /cvs/pkgs/rpms/python-peak-rules/devel/sources,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- sources	11 Oct 2008 22:33:55 -0000	1.3
+++ sources	2 Dec 2008 22:21:34 -0000	1.4
@@ -1 +1 @@
-13a93d0481507b24f1a20ee43519012e  PEAK-Rules-0.5a1.dev-r2581.tar.gz
+b6dcecef0a01b232653025d72fc67b01  PEAK-Rules-0.5a1.dev-r2582.tar.gz




More information about the fedora-extras-commits mailing list