test_build_ext.py 588 B

123456789101112131415161718
  1. import distutils.command.build_ext as orig
  2. from setuptools.command.build_ext import build_ext
  3. from setuptools.dist import Distribution
  4. class TestBuildExt:
  5. def test_get_ext_filename(self):
  6. """
  7. Setuptools needs to give back the same
  8. result as distutils, even if the fullname
  9. is not in ext_map.
  10. """
  11. dist = Distribution()
  12. cmd = build_ext(dist)
  13. cmd.ext_map['foo/bar'] = ''
  14. res = cmd.get_ext_filename('foo')
  15. wanted = orig.build_ext.get_ext_filename(cmd, 'foo')
  16. assert res == wanted