1
0

test_init.py 720 B

123456789101112131415161718192021222324
  1. # -*- coding: utf-8 -*-
  2. # Import Python Libraries
  3. from __future__ import print_function, unicode_literals, absolute_import
  4. import imp
  5. import os
  6. import shutil
  7. import setuptools_scm
  8. # Import Pepper Libraries
  9. import pepper
  10. def test_no_setup():
  11. setuppath = os.path.join(os.path.dirname(pepper.__file__), os.pardir, 'setup.py')
  12. shutil.move(setuppath, setuppath + '.bak')
  13. ptest = imp.load_source('ptest', os.path.join(os.path.dirname(pepper.__file__), '__init__.py'))
  14. shutil.move(setuppath + '.bak', setuppath)
  15. assert ptest.version == setuptools_scm.get_version()
  16. assert ptest.sha is None
  17. def test_version():
  18. assert pepper.version == setuptools_scm.get_version()
  19. assert pepper.sha is None