Exemple #1
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')
Exemple #2
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')