python类packages()的实例源码

__init__.py 文件源码 项目:Flask_Blog 作者: sugarguo 项目源码 文件源码 阅读 21 收藏 0 点赞 0 评论 0
def testExcludePackage(self):
        self.dist.exclude_package('a')
        self.assertEqual(self.dist.packages, ['b','c'])

        self.dist.exclude_package('b')
        self.assertEqual(self.dist.packages, ['c'])
        self.assertEqual(self.dist.py_modules, ['x'])
        self.assertEqual(self.dist.ext_modules, [self.e1, self.e2])

        self.dist.exclude_package('c')
        self.assertEqual(self.dist.packages, [])
        self.assertEqual(self.dist.py_modules, ['x'])
        self.assertEqual(self.dist.ext_modules, [self.e1])

        # test removals from unspecified options
        makeSetup().exclude_package('x')
__init__.py 文件源码 项目:Flask_Blog 作者: sugarguo 项目源码 文件源码 阅读 18 收藏 0 点赞 0 评论 0
def testUseFeatures(self):
        dist = self.dist
        self.assertEqual(dist.with_foo,1)
        self.assertEqual(dist.with_bar,0)
        self.assertEqual(dist.with_baz,1)
        self.assertTrue(not 'bar_et' in dist.py_modules)
        self.assertTrue(not 'pkg.bar' in dist.packages)
        self.assertTrue('pkg.baz' in dist.packages)
        self.assertTrue('scripts/baz_it' in dist.scripts)
        self.assertTrue(('libfoo','foo/foofoo.c') in dist.libraries)
        self.assertEqual(dist.ext_modules,[])
        self.assertEqual(dist.require_features, [self.req])

        # If we ask for bar, it should fail because we explicitly disabled
        # it on the command line
        self.assertRaises(DistutilsOptionError, dist.include_feature, 'bar')
__init__.py 文件源码 项目:flasky 作者: RoseOu 项目源码 文件源码 阅读 24 收藏 0 点赞 0 评论 0
def testExcludePackage(self):
        self.dist.exclude_package('a')
        self.assertEqual(self.dist.packages, ['b','c'])

        self.dist.exclude_package('b')
        self.assertEqual(self.dist.packages, ['c'])
        self.assertEqual(self.dist.py_modules, ['x'])
        self.assertEqual(self.dist.ext_modules, [self.e1, self.e2])

        self.dist.exclude_package('c')
        self.assertEqual(self.dist.packages, [])
        self.assertEqual(self.dist.py_modules, ['x'])
        self.assertEqual(self.dist.ext_modules, [self.e1])

        # test removals from unspecified options
        makeSetup().exclude_package('x')
__init__.py 文件源码 项目:flasky 作者: RoseOu 项目源码 文件源码 阅读 18 收藏 0 点赞 0 评论 0
def testUseFeatures(self):
        dist = self.dist
        self.assertEqual(dist.with_foo,1)
        self.assertEqual(dist.with_bar,0)
        self.assertEqual(dist.with_baz,1)
        self.assertTrue(not 'bar_et' in dist.py_modules)
        self.assertTrue(not 'pkg.bar' in dist.packages)
        self.assertTrue('pkg.baz' in dist.packages)
        self.assertTrue('scripts/baz_it' in dist.scripts)
        self.assertTrue(('libfoo','foo/foofoo.c') in dist.libraries)
        self.assertEqual(dist.ext_modules,[])
        self.assertEqual(dist.require_features, [self.req])

        # If we ask for bar, it should fail because we explicitly disabled
        # it on the command line
        self.assertRaises(DistutilsOptionError, dist.include_feature, 'bar')
__init__.py 文件源码 项目:chihu 作者: yelongyu 项目源码 文件源码 阅读 23 收藏 0 点赞 0 评论 0
def testExcludePackage(self):
        self.dist.exclude_package('a')
        self.assertEqual(self.dist.packages, ['b','c'])

        self.dist.exclude_package('b')
        self.assertEqual(self.dist.packages, ['c'])
        self.assertEqual(self.dist.py_modules, ['x'])
        self.assertEqual(self.dist.ext_modules, [self.e1, self.e2])

        self.dist.exclude_package('c')
        self.assertEqual(self.dist.packages, [])
        self.assertEqual(self.dist.py_modules, ['x'])
        self.assertEqual(self.dist.ext_modules, [self.e1])

        # test removals from unspecified options
        makeSetup().exclude_package('x')
__init__.py 文件源码 项目:chihu 作者: yelongyu 项目源码 文件源码 阅读 19 收藏 0 点赞 0 评论 0
def testUseFeatures(self):
        dist = self.dist
        self.assertEqual(dist.with_foo,1)
        self.assertEqual(dist.with_bar,0)
        self.assertEqual(dist.with_baz,1)
        self.assertTrue(not 'bar_et' in dist.py_modules)
        self.assertTrue(not 'pkg.bar' in dist.packages)
        self.assertTrue('pkg.baz' in dist.packages)
        self.assertTrue('scripts/baz_it' in dist.scripts)
        self.assertTrue(('libfoo','foo/foofoo.c') in dist.libraries)
        self.assertEqual(dist.ext_modules,[])
        self.assertEqual(dist.require_features, [self.req])

        # If we ask for bar, it should fail because we explicitly disabled
        # it on the command line
        self.assertRaises(DistutilsOptionError, dist.include_feature, 'bar')
__init__.py 文件源码 项目:Price-Comparator 作者: Thejas-1 项目源码 文件源码 阅读 17 收藏 0 点赞 0 评论 0
def testExcludePackage(self):
        self.dist.exclude_package('a')
        self.assertEqual(self.dist.packages, ['b','c'])

        self.dist.exclude_package('b')
        self.assertEqual(self.dist.packages, ['c'])
        self.assertEqual(self.dist.py_modules, ['x'])
        self.assertEqual(self.dist.ext_modules, [self.e1, self.e2])

        self.dist.exclude_package('c')
        self.assertEqual(self.dist.packages, [])
        self.assertEqual(self.dist.py_modules, ['x'])
        self.assertEqual(self.dist.ext_modules, [self.e1])

        # test removals from unspecified options
        makeSetup().exclude_package('x')
__init__.py 文件源码 项目:Price-Comparator 作者: Thejas-1 项目源码 文件源码 阅读 23 收藏 0 点赞 0 评论 0
def testUseFeatures(self):
        dist = self.dist
        self.assertEqual(dist.with_foo,1)
        self.assertEqual(dist.with_bar,0)
        self.assertEqual(dist.with_baz,1)
        self.assertTrue(not 'bar_et' in dist.py_modules)
        self.assertTrue(not 'pkg.bar' in dist.packages)
        self.assertTrue('pkg.baz' in dist.packages)
        self.assertTrue('scripts/baz_it' in dist.scripts)
        self.assertTrue(('libfoo','foo/foofoo.c') in dist.libraries)
        self.assertEqual(dist.ext_modules,[])
        self.assertEqual(dist.require_features, [self.req])

        # If we ask for bar, it should fail because we explicitly disabled
        # it on the command line
        self.assertRaises(DistutilsOptionError, dist.include_feature, 'bar')
__init__.py 文件源码 项目:Flask-NvRay-Blog 作者: rui7157 项目源码 文件源码 阅读 25 收藏 0 点赞 0 评论 0
def testExcludePackage(self):
        self.dist.exclude_package('a')
        self.assertEqual(self.dist.packages, ['b','c'])

        self.dist.exclude_package('b')
        self.assertEqual(self.dist.packages, ['c'])
        self.assertEqual(self.dist.py_modules, ['x'])
        self.assertEqual(self.dist.ext_modules, [self.e1, self.e2])

        self.dist.exclude_package('c')
        self.assertEqual(self.dist.packages, [])
        self.assertEqual(self.dist.py_modules, ['x'])
        self.assertEqual(self.dist.ext_modules, [self.e1])

        # test removals from unspecified options
        makeSetup().exclude_package('x')
__init__.py 文件源码 项目:Flask-NvRay-Blog 作者: rui7157 项目源码 文件源码 阅读 20 收藏 0 点赞 0 评论 0
def testUseFeatures(self):
        dist = self.dist
        self.assertEqual(dist.with_foo,1)
        self.assertEqual(dist.with_bar,0)
        self.assertEqual(dist.with_baz,1)
        self.assertTrue(not 'bar_et' in dist.py_modules)
        self.assertTrue(not 'pkg.bar' in dist.packages)
        self.assertTrue('pkg.baz' in dist.packages)
        self.assertTrue('scripts/baz_it' in dist.scripts)
        self.assertTrue(('libfoo','foo/foofoo.c') in dist.libraries)
        self.assertEqual(dist.ext_modules,[])
        self.assertEqual(dist.require_features, [self.req])

        # If we ask for bar, it should fail because we explicitly disabled
        # it on the command line
        self.assertRaises(DistutilsOptionError, dist.include_feature, 'bar')
__init__.py 文件源码 项目:NeuroMobile 作者: AndrewADykman 项目源码 文件源码 阅读 16 收藏 0 点赞 0 评论 0
def testExcludePackage(self):
        self.dist.exclude_package('a')
        self.assertEqual(self.dist.packages, ['b','c'])

        self.dist.exclude_package('b')
        self.assertEqual(self.dist.packages, ['c'])
        self.assertEqual(self.dist.py_modules, ['x'])
        self.assertEqual(self.dist.ext_modules, [self.e1, self.e2])

        self.dist.exclude_package('c')
        self.assertEqual(self.dist.packages, [])
        self.assertEqual(self.dist.py_modules, ['x'])
        self.assertEqual(self.dist.ext_modules, [self.e1])

        # test removals from unspecified options
        makeSetup().exclude_package('x')
__init__.py 文件源码 项目:NeuroMobile 作者: AndrewADykman 项目源码 文件源码 阅读 18 收藏 0 点赞 0 评论 0
def testUseFeatures(self):
        dist = self.dist
        self.assertEqual(dist.with_foo,1)
        self.assertEqual(dist.with_bar,0)
        self.assertEqual(dist.with_baz,1)
        self.assertTrue(not 'bar_et' in dist.py_modules)
        self.assertTrue(not 'pkg.bar' in dist.packages)
        self.assertTrue('pkg.baz' in dist.packages)
        self.assertTrue('scripts/baz_it' in dist.scripts)
        self.assertTrue(('libfoo','foo/foofoo.c') in dist.libraries)
        self.assertEqual(dist.ext_modules,[])
        self.assertEqual(dist.require_features, [self.req])

        # If we ask for bar, it should fail because we explicitly disabled
        # it on the command line
        self.assertRaises(DistutilsOptionError, dist.include_feature, 'bar')
__init__.py 文件源码 项目:dymo-m10-python 作者: pbrf 项目源码 文件源码 阅读 17 收藏 0 点赞 0 评论 0
def testExcludePackage(self):
        self.dist.exclude_package('a')
        self.assertEqual(self.dist.packages, ['b','c'])

        self.dist.exclude_package('b')
        self.assertEqual(self.dist.packages, ['c'])
        self.assertEqual(self.dist.py_modules, ['x'])
        self.assertEqual(self.dist.ext_modules, [self.e1, self.e2])

        self.dist.exclude_package('c')
        self.assertEqual(self.dist.packages, [])
        self.assertEqual(self.dist.py_modules, ['x'])
        self.assertEqual(self.dist.ext_modules, [self.e1])

        # test removals from unspecified options
        makeSetup().exclude_package('x')
__init__.py 文件源码 项目:dymo-m10-python 作者: pbrf 项目源码 文件源码 阅读 20 收藏 0 点赞 0 评论 0
def testUseFeatures(self):
        dist = self.dist
        self.assertEqual(dist.with_foo,1)
        self.assertEqual(dist.with_bar,0)
        self.assertEqual(dist.with_baz,1)
        self.assertTrue(not 'bar_et' in dist.py_modules)
        self.assertTrue(not 'pkg.bar' in dist.packages)
        self.assertTrue('pkg.baz' in dist.packages)
        self.assertTrue('scripts/baz_it' in dist.scripts)
        self.assertTrue(('libfoo','foo/foofoo.c') in dist.libraries)
        self.assertEqual(dist.ext_modules,[])
        self.assertEqual(dist.require_features, [self.req])

        # If we ask for bar, it should fail because we explicitly disabled
        # it on the command line
        self.assertRaises(DistutilsOptionError, dist.include_feature, 'bar')
__init__.py 文件源码 项目:Sudoku-Solver 作者: ayush1997 项目源码 文件源码 阅读 18 收藏 0 点赞 0 评论 0
def testExcludePackage(self):
        self.dist.exclude_package('a')
        assert self.dist.packages == ['b','c']

        self.dist.exclude_package('b')
        assert self.dist.packages == ['c']
        assert self.dist.py_modules == ['x']
        assert self.dist.ext_modules == [self.e1, self.e2]

        self.dist.exclude_package('c')
        assert self.dist.packages == []
        assert self.dist.py_modules == ['x']
        assert self.dist.ext_modules == [self.e1]

        # test removals from unspecified options
        makeSetup().exclude_package('x')
__init__.py 文件源码 项目:Sudoku-Solver 作者: ayush1997 项目源码 文件源码 阅读 21 收藏 0 点赞 0 评论 0
def testInvalidIncludeExclude(self):
        with pytest.raises(DistutilsSetupError):
            self.dist.include(nonexistent_option='x')
        with pytest.raises(DistutilsSetupError):
            self.dist.exclude(nonexistent_option='x')
        with pytest.raises(DistutilsSetupError):
            self.dist.include(packages={'x':'y'})
        with pytest.raises(DistutilsSetupError):
            self.dist.exclude(packages={'x':'y'})
        with pytest.raises(DistutilsSetupError):
            self.dist.include(ext_modules={'x':'y'})
        with pytest.raises(DistutilsSetupError):
            self.dist.exclude(ext_modules={'x':'y'})

        with pytest.raises(DistutilsSetupError):
            self.dist.include(package_dir=['q'])
        with pytest.raises(DistutilsSetupError):
            self.dist.exclude(package_dir=['q'])
__init__.py 文件源码 项目:Sudoku-Solver 作者: ayush1997 项目源码 文件源码 阅读 18 收藏 0 点赞 0 评论 0
def testUseFeatures(self):
        dist = self.dist
        assert dist.with_foo == 1
        assert dist.with_bar == 0
        assert dist.with_baz == 1
        assert (not 'bar_et' in dist.py_modules)
        assert (not 'pkg.bar' in dist.packages)
        assert ('pkg.baz' in dist.packages)
        assert ('scripts/baz_it' in dist.scripts)
        assert (('libfoo','foo/foofoo.c') in dist.libraries)
        assert dist.ext_modules == []
        assert dist.require_features == [self.req]

        # If we ask for bar, it should fail because we explicitly disabled
        # it on the command line
        with pytest.raises(DistutilsOptionError):
            dist.include_feature('bar')
test_setuptools.py 文件源码 项目:setuptools 作者: pypa 项目源码 文件源码 阅读 32 收藏 0 点赞 0 评论 0
def testExcludePackage(self):
        self.dist.exclude_package('a')
        assert self.dist.packages == ['b', 'c']

        self.dist.exclude_package('b')
        assert self.dist.packages == ['c']
        assert self.dist.py_modules == ['x']
        assert self.dist.ext_modules == [self.e1, self.e2]

        self.dist.exclude_package('c')
        assert self.dist.packages == []
        assert self.dist.py_modules == ['x']
        assert self.dist.ext_modules == [self.e1]

        # test removals from unspecified options
        makeSetup().exclude_package('x')
test_setuptools.py 文件源码 项目:setuptools 作者: pypa 项目源码 文件源码 阅读 26 收藏 0 点赞 0 评论 0
def testInvalidIncludeExclude(self):
        with pytest.raises(DistutilsSetupError):
            self.dist.include(nonexistent_option='x')
        with pytest.raises(DistutilsSetupError):
            self.dist.exclude(nonexistent_option='x')
        with pytest.raises(DistutilsSetupError):
            self.dist.include(packages={'x': 'y'})
        with pytest.raises(DistutilsSetupError):
            self.dist.exclude(packages={'x': 'y'})
        with pytest.raises(DistutilsSetupError):
            self.dist.include(ext_modules={'x': 'y'})
        with pytest.raises(DistutilsSetupError):
            self.dist.exclude(ext_modules={'x': 'y'})

        with pytest.raises(DistutilsSetupError):
            self.dist.include(package_dir=['q'])
        with pytest.raises(DistutilsSetupError):
            self.dist.exclude(package_dir=['q'])
test_setuptools.py 文件源码 项目:setuptools 作者: pypa 项目源码 文件源码 阅读 29 收藏 0 点赞 0 评论 0
def testUseFeatures(self):
        dist = self.dist
        assert dist.with_foo == 1
        assert dist.with_bar == 0
        assert dist.with_baz == 1
        assert ('bar_et' not in dist.py_modules)
        assert ('pkg.bar' not in dist.packages)
        assert ('pkg.baz' in dist.packages)
        assert ('scripts/baz_it' in dist.scripts)
        assert (('libfoo', 'foo/foofoo.c') in dist.libraries)
        assert dist.ext_modules == []
        assert dist.require_features == [self.req]

        # If we ask for bar, it should fail because we explicitly disabled
        # it on the command line
        with pytest.raises(DistutilsOptionError):
            dist.include_feature('bar')
__init__.py 文件源码 项目:kbe_server 作者: xiaohaoppy 项目源码 文件源码 阅读 21 收藏 0 点赞 0 评论 0
def testExcludePackage(self):
        self.dist.exclude_package('a')
        self.assertEqual(self.dist.packages, ['b','c'])

        self.dist.exclude_package('b')
        self.assertEqual(self.dist.packages, ['c'])
        self.assertEqual(self.dist.py_modules, ['x'])
        self.assertEqual(self.dist.ext_modules, [self.e1, self.e2])

        self.dist.exclude_package('c')
        self.assertEqual(self.dist.packages, [])
        self.assertEqual(self.dist.py_modules, ['x'])
        self.assertEqual(self.dist.ext_modules, [self.e1])

        # test removals from unspecified options
        makeSetup().exclude_package('x')
__init__.py 文件源码 项目:kbe_server 作者: xiaohaoppy 项目源码 文件源码 阅读 17 收藏 0 点赞 0 评论 0
def testUseFeatures(self):
        dist = self.dist
        self.assertEqual(dist.with_foo,1)
        self.assertEqual(dist.with_bar,0)
        self.assertEqual(dist.with_baz,1)
        self.assertTrue(not 'bar_et' in dist.py_modules)
        self.assertTrue(not 'pkg.bar' in dist.packages)
        self.assertTrue('pkg.baz' in dist.packages)
        self.assertTrue('scripts/baz_it' in dist.scripts)
        self.assertTrue(('libfoo','foo/foofoo.c') in dist.libraries)
        self.assertEqual(dist.ext_modules,[])
        self.assertEqual(dist.require_features, [self.req])

        # If we ask for bar, it should fail because we explicitly disabled
        # it on the command line
        self.assertRaises(DistutilsOptionError, dist.include_feature, 'bar')
__init__.py 文件源码 项目:micro-blog 作者: nickChenyx 项目源码 文件源码 阅读 20 收藏 0 点赞 0 评论 0
def testExcludePackage(self):
        self.dist.exclude_package('a')
        self.assertEqual(self.dist.packages, ['b','c'])

        self.dist.exclude_package('b')
        self.assertEqual(self.dist.packages, ['c'])
        self.assertEqual(self.dist.py_modules, ['x'])
        self.assertEqual(self.dist.ext_modules, [self.e1, self.e2])

        self.dist.exclude_package('c')
        self.assertEqual(self.dist.packages, [])
        self.assertEqual(self.dist.py_modules, ['x'])
        self.assertEqual(self.dist.ext_modules, [self.e1])

        # test removals from unspecified options
        makeSetup().exclude_package('x')
__init__.py 文件源码 项目:micro-blog 作者: nickChenyx 项目源码 文件源码 阅读 18 收藏 0 点赞 0 评论 0
def testUseFeatures(self):
        dist = self.dist
        self.assertEqual(dist.with_foo,1)
        self.assertEqual(dist.with_bar,0)
        self.assertEqual(dist.with_baz,1)
        self.assertTrue(not 'bar_et' in dist.py_modules)
        self.assertTrue(not 'pkg.bar' in dist.packages)
        self.assertTrue('pkg.baz' in dist.packages)
        self.assertTrue('scripts/baz_it' in dist.scripts)
        self.assertTrue(('libfoo','foo/foofoo.c') in dist.libraries)
        self.assertEqual(dist.ext_modules,[])
        self.assertEqual(dist.require_features, [self.req])

        # If we ask for bar, it should fail because we explicitly disabled
        # it on the command line
        self.assertRaises(DistutilsOptionError, dist.include_feature, 'bar')
__init__.py 文件源码 项目:browser_vuln_check 作者: lcatro 项目源码 文件源码 阅读 18 收藏 0 点赞 0 评论 0
def testExcludePackage(self):
        self.dist.exclude_package('a')
        assert self.dist.packages == ['b', 'c']

        self.dist.exclude_package('b')
        assert self.dist.packages == ['c']
        assert self.dist.py_modules == ['x']
        assert self.dist.ext_modules == [self.e1, self.e2]

        self.dist.exclude_package('c')
        assert self.dist.packages == []
        assert self.dist.py_modules == ['x']
        assert self.dist.ext_modules == [self.e1]

        # test removals from unspecified options
        makeSetup().exclude_package('x')
__init__.py 文件源码 项目:browser_vuln_check 作者: lcatro 项目源码 文件源码 阅读 21 收藏 0 点赞 0 评论 0
def testInvalidIncludeExclude(self):
        with pytest.raises(DistutilsSetupError):
            self.dist.include(nonexistent_option='x')
        with pytest.raises(DistutilsSetupError):
            self.dist.exclude(nonexistent_option='x')
        with pytest.raises(DistutilsSetupError):
            self.dist.include(packages={'x': 'y'})
        with pytest.raises(DistutilsSetupError):
            self.dist.exclude(packages={'x': 'y'})
        with pytest.raises(DistutilsSetupError):
            self.dist.include(ext_modules={'x': 'y'})
        with pytest.raises(DistutilsSetupError):
            self.dist.exclude(ext_modules={'x': 'y'})

        with pytest.raises(DistutilsSetupError):
            self.dist.include(package_dir=['q'])
        with pytest.raises(DistutilsSetupError):
            self.dist.exclude(package_dir=['q'])
__init__.py 文件源码 项目:browser_vuln_check 作者: lcatro 项目源码 文件源码 阅读 18 收藏 0 点赞 0 评论 0
def testUseFeatures(self):
        dist = self.dist
        assert dist.with_foo == 1
        assert dist.with_bar == 0
        assert dist.with_baz == 1
        assert ('bar_et' not in dist.py_modules)
        assert ('pkg.bar' not in dist.packages)
        assert ('pkg.baz' in dist.packages)
        assert ('scripts/baz_it' in dist.scripts)
        assert (('libfoo', 'foo/foofoo.c') in dist.libraries)
        assert dist.ext_modules == []
        assert dist.require_features == [self.req]

        # If we ask for bar, it should fail because we explicitly disabled
        # it on the command line
        with pytest.raises(DistutilsOptionError):
            dist.include_feature('bar')
__init__.py 文件源码 项目:facebook-face-recognition 作者: mathur 项目源码 文件源码 阅读 19 收藏 0 点赞 0 评论 0
def testExcludePackage(self):
        self.dist.exclude_package('a')
        assert self.dist.packages == ['b','c']

        self.dist.exclude_package('b')
        assert self.dist.packages == ['c']
        assert self.dist.py_modules == ['x']
        assert self.dist.ext_modules == [self.e1, self.e2]

        self.dist.exclude_package('c')
        assert self.dist.packages == []
        assert self.dist.py_modules == ['x']
        assert self.dist.ext_modules == [self.e1]

        # test removals from unspecified options
        makeSetup().exclude_package('x')
__init__.py 文件源码 项目:facebook-face-recognition 作者: mathur 项目源码 文件源码 阅读 47 收藏 0 点赞 0 评论 0
def testInvalidIncludeExclude(self):
        with pytest.raises(DistutilsSetupError):
            self.dist.include(nonexistent_option='x')
        with pytest.raises(DistutilsSetupError):
            self.dist.exclude(nonexistent_option='x')
        with pytest.raises(DistutilsSetupError):
            self.dist.include(packages={'x':'y'})
        with pytest.raises(DistutilsSetupError):
            self.dist.exclude(packages={'x':'y'})
        with pytest.raises(DistutilsSetupError):
            self.dist.include(ext_modules={'x':'y'})
        with pytest.raises(DistutilsSetupError):
            self.dist.exclude(ext_modules={'x':'y'})

        with pytest.raises(DistutilsSetupError):
            self.dist.include(package_dir=['q'])
        with pytest.raises(DistutilsSetupError):
            self.dist.exclude(package_dir=['q'])
__init__.py 文件源码 项目:facebook-face-recognition 作者: mathur 项目源码 文件源码 阅读 19 收藏 0 点赞 0 评论 0
def testUseFeatures(self):
        dist = self.dist
        assert dist.with_foo == 1
        assert dist.with_bar == 0
        assert dist.with_baz == 1
        assert (not 'bar_et' in dist.py_modules)
        assert (not 'pkg.bar' in dist.packages)
        assert ('pkg.baz' in dist.packages)
        assert ('scripts/baz_it' in dist.scripts)
        assert (('libfoo','foo/foofoo.c') in dist.libraries)
        assert dist.ext_modules == []
        assert dist.require_features == [self.req]

        # If we ask for bar, it should fail because we explicitly disabled
        # it on the command line
        with pytest.raises(DistutilsOptionError):
            dist.include_feature('bar')


问题


面经


文章

微信
公众号

扫码关注公众号