Commits

Philip Jenvey committed e0818fd

these assume dict ordering, disable (for now) on Jython

Comments (0)

Files changed (1)

tests/test_paginate.py

 """"Test webhelpers.paginate package."""
+import sys
 
 from routes import Mapper
 
     assert page.pager(separator='_') == '<span class="pager_curpage">1</span>_<a class="pager_link" href="/content?page=2">2</a>_<a class="pager_link" href="/content?page=3">3</a>_<span class="pager_dotdot">..</span>_<a class="pager_link" href="/content?page=7">7</a>'
     assert page.pager(page_param='xy') == '<span class="pager_curpage">1</span> <a class="pager_link" href="/content?xy=2">2</a> <a class="pager_link" href="/content?xy=3">3</a> <span class="pager_dotdot">..</span> <a class="pager_link" href="/content?xy=7">7</a>'
     assert page.pager(link_attr={'style':'s1'}, curpage_attr={'style':'s2'}, dotdot_attr={'style':'s3'}) == '<span style="s2">1</span> <a href="/content?page=2" style="s1">2</a> <a href="/content?page=3" style="s1">3</a> <span style="s3">..</span> <a href="/content?page=7" style="s1">7</a>'
-    assert page.pager(onclick="load('%s')") == '<span class="pager_curpage">1</span> <a class="pager_link" href="/content?page=2" onclick="load(\'/content?partial=1&amp;page=2\')">2</a> <a class="pager_link" href="/content?page=3" onclick="load(\'/content?partial=1&amp;page=3\')">3</a> <span class="pager_dotdot">..</span> <a class="pager_link" href="/content?page=7" onclick="load(\'/content?partial=1&amp;page=7\')">7</a>'
     assert page.pager(onclick="empty") == '<span class="pager_curpage">1</span> <a class="pager_link" href="/content?page=2" onclick="empty">2</a> <a class="pager_link" href="/content?page=3" onclick="empty">3</a> <span class="pager_dotdot">..</span> <a class="pager_link" href="/content?page=7" onclick="empty">7</a>'
     assert page.pager(onclick="load('$page')") == '<span class="pager_curpage">1</span> <a class="pager_link" href="/content?page=2" onclick="load(\'2\')">2</a> <a class="pager_link" href="/content?page=3" onclick="load(\'3\')">3</a> <span class="pager_dotdot">..</span> <a class="pager_link" href="/content?page=7" onclick="load(\'7\')">7</a>'
-    assert page.pager(onclick="load('$partial_url')") == '<span class="pager_curpage">1</span> <a class="pager_link" href="/content?page=2" onclick="load(\'/content?partial=1&amp;page=2\')">2</a> <a class="pager_link" href="/content?page=3" onclick="load(\'/content?partial=1&amp;page=3\')">3</a> <span class="pager_dotdot">..</span> <a class="pager_link" href="/content?page=7" onclick="load(\'/content?partial=1&amp;page=7\')">7</a>'
+    if not sys.platform.startswith('java'):
+        # XXX: these assume dict ordering
+        assert page.pager(onclick="load('%s')") == '<span class="pager_curpage">1</span> <a class="pager_link" href="/content?page=2" onclick="load(\'/content?partial=1&amp;page=2\')">2</a> <a class="pager_link" href="/content?page=3" onclick="load(\'/content?partial=1&amp;page=3\')">3</a> <span class="pager_dotdot">..</span> <a class="pager_link" href="/content?page=7" onclick="load(\'/content?partial=1&amp;page=7\')">7</a>'
+        assert page.pager(onclick="load('$partial_url')") == '<span class="pager_curpage">1</span> <a class="pager_link" href="/content?page=2" onclick="load(\'/content?partial=1&amp;page=2\')">2</a> <a class="pager_link" href="/content?page=3" onclick="load(\'/content?partial=1&amp;page=3\')">3</a> <span class="pager_dotdot">..</span> <a class="pager_link" href="/content?page=7" onclick="load(\'/content?partial=1&amp;page=7\')">7</a>'
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.