free yourself from the PYTHONPATH

This commit is contained in:
Jeff Balogh 2010-07-14 12:08:08 -07:00
Родитель 6b1ca57a8c
Коммит 4182800c30
14 изменённых файлов: 46 добавлений и 43 удалений

1
MANIFEST.in Normal file
Просмотреть файл

@ -0,0 +1 @@
include validator/testcases/hashes.txt

Просмотреть файл

@ -5,21 +5,21 @@ import zipfile
from StringIO import StringIO
import argparse
import decorator
from validator import decorator
import typedetection
import testcases.packagelayout
import testcases.installrdf
import testcases.library_blacklist
import testcases.conduit
import testcases.langpack
import testcases.themes
import testcases.content
import testcases.targetapplication
import testcases.l10ncompleteness
from xpi import XPIManager
import validator.testcases.packagelayout
import validator.testcases.installrdf
import validator.testcases.library_blacklist
import validator.testcases.conduit
import validator.testcases.langpack
import validator.testcases.themes
import validator.testcases.content
import validator.testcases.targetapplication
import validator.testcases.l10ncompleteness
from validator.xpi import XPIManager
from rdf import RDFParser
from errorbundler import ErrorBundle
from constants import *
from validator.constants import *
def main():
"Main function. Handles delegation to other functions."

Просмотреть файл

@ -1,7 +1,7 @@
import fnmatch
import decorator
from chromemanifest import ChromeManifest
from validator import decorator
from validator.chromemanifest import ChromeManifest
@decorator.register_test(1)
def test_conduittoolbar(err, package_contents=None, xpi_manager=None):

Просмотреть файл

@ -1,13 +1,13 @@
from StringIO import StringIO
import decorator
from validator import decorator
import validator as testendpoint_validator
import testcases.markup.markuptester as testendpoint_markup
import testcases.markup.csstester as testendpoint_css
import testcases.langpack as testendpoint_langpack
from xpi import XPIManager
from constants import PACKAGE_LANGPACK, PACKAGE_SUBPACKAGE
import validator.testcases.markup.markuptester as testendpoint_markup
import validator.testcases.markup.csstester as testendpoint_css
import validator.testcases.langpack as testendpoint_langpack
from validator.xpi import XPIManager
from validator.constants import PACKAGE_LANGPACK, PACKAGE_SUBPACKAGE
@decorator.register_test(tier=2)

Просмотреть файл

Просмотреть файл

@ -1,7 +1,7 @@
import re
import decorator
from constants import *
from validator import decorator
from validator.constants import *
@decorator.register_test(tier=1)
def test_install_rdf_params(err,

Просмотреть файл

@ -4,15 +4,15 @@ import os
import json
from StringIO import StringIO
import decorator
from chromemanifest import ChromeManifest
from xpi import XPIManager
from constants import PACKAGE_EXTENSION, \
from validator import decorator
from validator.chromemanifest import ChromeManifest
from validator.xpi import XPIManager
from validator.constants import PACKAGE_EXTENSION, \
PACKAGE_THEME, \
PACKAGE_LANGPACK
import testcases.l10n.dtd as dtd
import testcases.l10n.properties as properties
import validator.testcases.l10n.dtd as dtd
import validator.testcases.l10n.properties as properties
# The threshold that determines the number of entities that must not be
# missing from the package.

Просмотреть файл

@ -1,9 +1,9 @@
import fnmatch
import re
import decorator
from chromemanifest import ChromeManifest
from constants import PACKAGE_LANGPACK
from validator import decorator
from validator.chromemanifest import ChromeManifest
from validator.constants import PACKAGE_LANGPACK
BAD_LINK = '(href|src)=["\'](?!(chrome:\/\/|#([a-z][a-z0-9\-_:\.]*)?))'

Просмотреть файл

@ -1,6 +1,7 @@
import hashlib
import os
import decorator
from validator import decorator
@decorator.register_test(tier=1)
def test_library_blacklist(err, package_contents=None, xpi_package=None):
@ -16,7 +17,8 @@ def test_library_blacklist(err, package_contents=None, xpi_package=None):
generated using the libhasher.py tool."""
# Generate a tuple of definition data
lines = open("hashes.txt").readlines()
path = os.path.join(os.path.dirname(__file__), 'hashes.txt')
lines = open(path).readlines()
definitions = [line.strip() for line in lines]
# Iterate each file

Просмотреть файл

@ -5,8 +5,8 @@ try:
except ImportError: # pragma: no cover
from html.parser import HTMLParser
from testcases.markup import csstester
from constants import *
from validator.testcases.markup import csstester
from validator.constants import *
DEBUG = False

Просмотреть файл

@ -1,6 +1,6 @@
import fnmatch
import decorator
from validator import decorator
def test_unknown_file(err, filename):

Просмотреть файл

@ -1,6 +1,6 @@
import decorator
from constants import *
from validator import decorator
from validator.constants import *
APPLICATIONS = {
"{ec8030f7-c20a-464f-9b0e-13a3a9e97384}": "firefox",

Просмотреть файл

@ -1,6 +1,6 @@
import decorator
from chromemanifest import ChromeManifest
from constants import PACKAGE_THEME
from validator import decorator
from validator.chromemanifest import ChromeManifest
from validator.constants import PACKAGE_THEME
@decorator.register_test(tier=2, expected_type=PACKAGE_THEME)

Просмотреть файл

@ -1,5 +1,5 @@
from xml.dom.minidom import parse
from constants import *
from validator.constants import *
def detect_type(err, install_rdf=None, xpi_package=None):
"""Determines the type of addon being validated based on