1
0

test_info.py 1003 B

1234567891011121314151617181920212223242526272829303132333435363738
  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. @pytest.mark.destructive_test
  10. @pytest.mark.windows_whitelisted
  11. class SPMInfoTest(SPMCase):
  12. """
  13. Validate the spm info command
  14. """
  15. def setUp(self):
  16. self.config = self._spm_config()
  17. self._spm_build_files(self.config)
  18. @pytest.mark.slow_test(seconds=5) # Test takes >1 and <=5 seconds
  19. def test_spm_info(self):
  20. """
  21. test spm build
  22. """
  23. self._spm_create_update_repo(self.config)
  24. install = self.run_spm("install", self.config, "apache")
  25. get_info = self.run_spm("info", self.config, "apache")
  26. check_info = ["Supported OSes", "Supported OS", "installing Apache"]
  27. for info in check_info:
  28. self.assertIn(info, "".join(get_info))
  29. def tearDown(self):
  30. shutil.rmtree(self._tmp_spm)