test_setuptools.py 文件源码

python
阅读 29 收藏 0 点赞 0 评论 0

项目:setuptools 作者: pypa 项目源码 文件源码
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')
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号