Merge pull request #194 from alfonsodg/master
Fixing some typos inside tests and unneeded modules
This commit is contained in:
+1
-1
@@ -18,7 +18,7 @@ from fileutils import up, fix_newlines, abspath, recursive_unlink
|
||||
from fileutils import read_file, write_file, parse_version
|
||||
from restricted import RestrictedError
|
||||
from settings import global_settings
|
||||
from http import HTTP
|
||||
|
||||
|
||||
if not global_settings.web2py_runtime_gae:
|
||||
import site
|
||||
|
||||
+1
-1
@@ -68,7 +68,7 @@ class CacheAbstract(object):
|
||||
|
||||
def __init__(self, request=None):
|
||||
"""
|
||||
Paremeters
|
||||
Parameters
|
||||
----------
|
||||
request:
|
||||
the global request object
|
||||
|
||||
@@ -13,7 +13,6 @@ FOR INTERNAL USE ONLY
|
||||
"""
|
||||
|
||||
import re
|
||||
import sys
|
||||
import fnmatch
|
||||
import os
|
||||
import copy
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
|
||||
import __builtin__
|
||||
import os
|
||||
import re
|
||||
import sys
|
||||
import threading
|
||||
import traceback
|
||||
|
||||
+4
-4
@@ -10703,7 +10703,7 @@ class Rows(object):
|
||||
def test_all():
|
||||
"""
|
||||
|
||||
>>> if len(sys.argv)<2: db = DAL(\"sqlite://test.db\")
|
||||
>>> if len(sys.argv)<2: db = DAL("sqlite://test.db")
|
||||
>>> if len(sys.argv)>1: db = DAL(sys.argv[1])
|
||||
>>> tmp = db.define_table('users',\
|
||||
Field('stringf', 'string', length=32, required=True),\
|
||||
@@ -10739,8 +10739,8 @@ def test_all():
|
||||
Field('name'),\
|
||||
Field('birth','date'),\
|
||||
migrate='test_person.table')
|
||||
>>> person_id = db.person.insert(name=\"Marco\",birth='2005-06-22')
|
||||
>>> person_id = db.person.insert(name=\"Massimo\",birth='1971-12-21')
|
||||
>>> person_id = db.person.insert(name='Marco',birth='2005-06-22')
|
||||
>>> person_id = db.person.insert(name='Massimo',birth='1971-12-21')
|
||||
|
||||
commented len(db().select(db.person.ALL))
|
||||
commented 2
|
||||
@@ -10766,7 +10766,7 @@ def test_all():
|
||||
|
||||
Update a single record
|
||||
|
||||
>>> me.update_record(name=\"Max\")
|
||||
>>> me.update_record(name="Max")
|
||||
<Row {'name': 'Max', 'birth': datetime.date(1971, 12, 21), 'id': 2}>
|
||||
>>> me.name
|
||||
'Max'
|
||||
|
||||
@@ -10,7 +10,6 @@ License: LGPLv3 (http://www.gnu.org/licenses/lgpl.html)
|
||||
"""
|
||||
|
||||
import logging
|
||||
import os
|
||||
import pdb
|
||||
import Queue
|
||||
import sys
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
import codecs
|
||||
import encodings
|
||||
|
||||
|
||||
"""Caller will hand this library a buffer and ask it to either convert
|
||||
it or auto-detect the type.
|
||||
|
||||
@@ -7,7 +7,6 @@ Copyrighted by Massimo Di Pierro <mdipierro@cs.depaul.edu>
|
||||
License: LGPLv3 (http://www.gnu.org/licenses/lgpl.html)
|
||||
"""
|
||||
|
||||
import sys
|
||||
import storage
|
||||
import os
|
||||
import re
|
||||
|
||||
+5
-5
@@ -1961,7 +1961,7 @@ class FORM(DIV):
|
||||
example::
|
||||
|
||||
>>> from validators import IS_NOT_EMPTY
|
||||
>>> form=FORM(INPUT(_name=\"test\", requires=IS_NOT_EMPTY()))
|
||||
>>> form=FORM(INPUT(_name="test", requires=IS_NOT_EMPTY()))
|
||||
>>> form.xml()
|
||||
'<form action=\"#\" enctype=\"multipart/form-data\" method=\"post\"><input name=\"test\" type=\"text\" /></form>'
|
||||
|
||||
@@ -2501,11 +2501,11 @@ def test():
|
||||
Example:
|
||||
|
||||
>>> from validators import *
|
||||
>>> print DIV(A('click me', _href=URL(a='a', c='b', f='c')), BR(), HR(), DIV(SPAN(\"World\"), _class='unknown')).xml()
|
||||
>>> print DIV(A('click me', _href=URL(a='a', c='b', f='c')), BR(), HR(), DIV(SPAN("World"), _class='unknown')).xml()
|
||||
<div><a data-w2p_disable_with="default" href="/a/b/c">click me</a><br /><hr /><div class=\"unknown\"><span>World</span></div></div>
|
||||
>>> print DIV(UL(\"doc\",\"cat\",\"mouse\")).xml()
|
||||
>>> print DIV(UL("doc","cat","mouse")).xml()
|
||||
<div><ul><li>doc</li><li>cat</li><li>mouse</li></ul></div>
|
||||
>>> print DIV(UL(\"doc\", LI(\"cat\", _class='feline'), 18)).xml()
|
||||
>>> print DIV(UL("doc", LI("cat", _class='feline'), 18)).xml()
|
||||
<div><ul><li>doc</li><li class=\"feline\">cat</li><li>18</li></ul></div>
|
||||
>>> print TABLE(['a', 'b', 'c'], TR('d', 'e', 'f'), TR(TD(1), TD(2), TD(3))).xml()
|
||||
<table><tr><td>a</td><td>b</td><td>c</td></tr><tr><td>d</td><td>e</td><td>f</td></tr><tr><td>1</td><td>2</td><td>3</td></tr></table>
|
||||
@@ -2531,7 +2531,7 @@ def test():
|
||||
>>> print form.xml()
|
||||
<form action="#" enctype="multipart/form-data" method="post"><input class="invalidinput" name="myvar" type="text" value="as df" /><div class="error_wrapper"><div class="error" id="myvar__error">only alphanumeric!</div></div></form>
|
||||
>>> session={}
|
||||
>>> form=FORM(INPUT(value=\"Hello World\", _name=\"var\", requires=IS_MATCH('^\w+$')))
|
||||
>>> form=FORM(INPUT(value="Hello World", _name="var", requires=IS_MATCH('^\w+$')))
|
||||
>>> isinstance(form.as_dict(), dict)
|
||||
True
|
||||
>>> form.as_dict(flat=True).has_key("vars")
|
||||
|
||||
@@ -15,7 +15,6 @@ import re
|
||||
import sys
|
||||
import pkgutil
|
||||
import logging
|
||||
import marshal
|
||||
from cgi import escape
|
||||
from threading import RLock
|
||||
|
||||
|
||||
@@ -14,7 +14,6 @@ Contains:
|
||||
|
||||
if False: import import_all # DO NOT REMOVE PART OF FREEZE PROCESS
|
||||
import gc
|
||||
import cStringIO
|
||||
import Cookie
|
||||
import os
|
||||
import re
|
||||
|
||||
@@ -6,7 +6,6 @@ License: LGPLv3 (http://www.gnu.org/licenses/lgpl.html)
|
||||
|
||||
import os
|
||||
import sys
|
||||
import socket
|
||||
import platform
|
||||
from storage import Storage
|
||||
|
||||
|
||||
+2
-2
@@ -845,9 +845,9 @@ def render(content="hello world",
|
||||
'hello world'
|
||||
>>> render(content='abc')
|
||||
'abc'
|
||||
>>> render(content='abc\\'')
|
||||
>>> render(content='abc\'')
|
||||
"abc'"
|
||||
>>> render(content='a"\\'bc')
|
||||
>>> render(content='a"\'bc')
|
||||
'a"\\'bc'
|
||||
>>> render(content='a\\nbc')
|
||||
'a\\nbc'
|
||||
|
||||
+1
-3
@@ -11,8 +11,6 @@ This file specifically includes utilities for security.
|
||||
|
||||
import threading
|
||||
import struct
|
||||
#import hashlib
|
||||
#import hmac
|
||||
import uuid
|
||||
import random
|
||||
import time
|
||||
@@ -23,7 +21,7 @@ import logging
|
||||
import socket
|
||||
import base64
|
||||
import zlib
|
||||
from types import ModuleType
|
||||
|
||||
|
||||
_struct_2_long_long = struct.Struct('=QQ')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user