Package lxml :: Package tests :: Module common_imports
[hide private]
[frames] | no frames]

Module common_imports

source code

Classes [hide private]
  skipif
Using a class because a function would bind into a method when used in classes
  HelperTestCase
  SillyFileLike
  LargeFileLike
  LargeFileLikeUnicode
Functions [hide private]
 
make_version_tuple(version_string) source code
 
filter_by_version(test_class, version_dict, current_version)
Remove test methods that do not work with the current lib version.
source code
 
_get_caller_relative_path(filename, frame_depth=2) source code
 
_str(s, encoding='UTF-8') source code
 
_bytes(s, encoding='UTF-8') source code
 
_fix_traceback(...)
sub(repl, string[, count = 0]) --> newstring Return the string obtained by replacing the leftmost non-overlapping occurrences of pattern in string by the replacement repl.
source code
 
_fix_exceptions(...)
sub(repl, string[, count = 0]) --> newstring Return the string obtained by replacing the leftmost non-overlapping occurrences of pattern in string by the replacement repl.
source code
 
_fix_bytes(...)
sub(repl, string[, count = 0]) --> newstring Return the string obtained by replacing the leftmost non-overlapping occurrences of pattern in string by the replacement repl.
source code
 
make_doctest(filename) source code
 
fileInTestDir(name) source code
 
path2url(path) source code
 
fileUrlInTestDir(name) source code
 
read_file(name, mode='r') source code
 
write_to_file(name, data, mode='w') source code
 
readFileInTestDir(name, mode='r') source code
 
canonicalize(xml) source code
 
unentitify(xml) source code
Variables [hide private]
  IS_PYPY = False
  IS_PYTHON3 = False
  IS_PYTHON2 = True
  ET_VERSION = (1, 3, 0)
  CET_VERSION = (1, 0, 6)
  unichr_escape = re.compile(r'\\u[0-9a-fA-F]{4}|U[0-9a-fA-F]{8}')
  _fix_unicode = re.compile(r'(\s+)u(["\'])').sub
  doctest_parser = <doctest.DocTestParser object>
  __package__ = 'lxml.tests'