~j5-dev/+junk/setuptools-0.6c11

« back to all changes in this revision

Viewing changes to setuptools/tests/__init__.py

  • Committer: Bazaar Package Importer
  • Author(s): Matthias Klose
  • Date: 2008-09-25 10:40:35 UTC
  • mfrom: (1.1.10 upstream) (2.1.2 lenny)
  • Revision ID: james.westby@ubuntu.com-20080925104035-4t3bfbs44064gp6u
Tags: 0.6c9-0ubuntu1
* New upstream version (bug fixes from the stable branch).
  - Adds subversion 1.5 compatibility. LP: #262636.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
"""Tests for the 'setuptools' package"""
2
 
 
3
2
from unittest import TestSuite, TestCase, makeSuite, defaultTestLoader
4
3
import distutils.core, distutils.cmd
5
4
from distutils.errors import DistutilsOptionError, DistutilsPlatformError
7
6
import setuptools, setuptools.dist
8
7
from setuptools import Feature
9
8
from distutils.core import Extension
10
 
from setuptools.depends import extract_constant, get_module_constant
11
 
from setuptools.depends import find_module, Require
 
9
extract_constant, get_module_constant = None, None
 
10
from setuptools.depends import *
12
11
from distutils.version import StrictVersion, LooseVersion
13
12
from distutils.util import convert_path
14
13
import sys, os.path
41
40
 
42
41
 
43
42
 
44
 
 
45
 
 
46
 
 
47
43
class DependsTests(TestCase):
48
44
 
49
45
    def testExtractConst(self):
50
 
 
51
 
        from setuptools.depends import extract_constant
 
46
        if not extract_constant: return  # skip on non-bytecode platforms
52
47
 
53
48
        def f1():
54
49
            global x,y,z
74
69
        f,p,i = find_module('setuptools.tests'); f.close()
75
70
 
76
71
    def testModuleExtract(self):
 
72
        if not get_module_constant: return  # skip on non-bytecode platforms
77
73
        from distutils import __version__
78
74
        self.assertEqual(
79
75
            get_module_constant('distutils','__version__'), __version__
86
82
        )
87
83
 
88
84
    def testRequire(self):
 
85
        if not extract_constant: return  # skip on non-bytecode platforms
89
86
 
90
87
        req = Require('Distutils','1.0.3','distutils')
91
88
 
125
122
        self.failUnless(req.is_current(paths))
126
123
 
127
124
 
128
 
 
129
125
class DistroTests(TestCase):
130
126
 
131
127
    def setUp(self):