test_info.py 993 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. # -*- coding: utf-8 -*-
  2. """
  3. Tests for the spm info utility
  4. """
  5. from __future__ import absolute_import, print_function, unicode_literals
  6. import shutil
  7. import pytest
  8. from tests.support.case import SPMCase
  9. from tests.support.helpers import destructiveTest, slowTest
  10. @destructiveTest
  11. @pytest.mark.windows_whitelisted
  12. class SPMInfoTest(SPMCase):
  13. """
  14. Validate the spm info command
  15. """
  16. def setUp(self):
  17. self.config = self._spm_config()
  18. self._spm_build_files(self.config)
  19. @slowTest
  20. def test_spm_info(self):
  21. """
  22. test spm build
  23. """
  24. self._spm_create_update_repo(self.config)
  25. install = self.run_spm("install", self.config, "apache")
  26. get_info = self.run_spm("info", self.config, "apache")
  27. check_info = ["Supported OSes", "Supported OS", "installing Apache"]
  28. for info in check_info:
  29. self.assertIn(info, "".join(get_info))
  30. def tearDown(self):
  31. shutil.rmtree(self._tmp_spm)