def test_all_site_dirs(self, monkeypatch):
     """
     get_site_dirs should always return site dirs reported by
     site.getsitepackages.
     """
     mock_gsp = lambda: ['/setuptools/test/site-packages']
     monkeypatch.setattr(site, 'getsitepackages', mock_gsp, raising=False)
     assert '/setuptools/test/site-packages' in ei.get_site_dirs()
Example #2
0
 def test_all_site_dirs(self, monkeypatch):
     """
     get_site_dirs should always return site dirs reported by
     site.getsitepackages.
     """
     mock_gsp = lambda: ['/setuptools/test/site-packages']
     monkeypatch.setattr(site, 'getsitepackages', mock_gsp, raising=False)
     assert '/setuptools/test/site-packages' in ei.get_site_dirs()
    def test_all_site_dirs(self, monkeypatch):
        """
        get_site_dirs should always return site dirs reported by
        site.getsitepackages.
        """
        path = normalize_path('/setuptools/test/site-packages')

        def mock_gsp():
            return [path]
        monkeypatch.setattr(site, 'getsitepackages', mock_gsp, raising=False)
        assert path in ei.get_site_dirs()
    def test_all_site_dirs(self, monkeypatch):
        """
        get_site_dirs should always return site dirs reported by
        site.getsitepackages.
        """
        path = normalize_path('/setuptools/test/site-packages')

        def mock_gsp():
            return [path]
        monkeypatch.setattr(site, 'getsitepackages', mock_gsp, raising=False)
        assert path in ei.get_site_dirs()
Example #5
0
 def test_all_site_dirs_works_without_getsitepackages(self, monkeypatch):
     monkeypatch.delattr(site, 'getsitepackages', raising=False)
     assert ei.get_site_dirs()
Example #6
0
 def test_all_site_dirs_works_without_getsitepackages(self, monkeypatch):
     monkeypatch.delattr(site, 'getsitepackages', raising=False)
     assert ei.get_site_dirs()