test_scripts.py 379 B

123456789101112
  1. from setuptools import _scripts
  2. class TestWindowsScriptWriter:
  3. def test_header(self):
  4. hdr = _scripts.WindowsScriptWriter.get_header('')
  5. assert hdr.startswith('#!')
  6. assert hdr.endswith('\n')
  7. hdr = hdr.lstrip('#!')
  8. hdr = hdr.rstrip('\n')
  9. # header should not start with an escaped quote
  10. assert not hdr.startswith('\\"')