From 08addeba5d1a758b06a80bc675f49409ef0003b9 Mon Sep 17 00:00:00 2001 From: Andrew Johnson Date: Tue, 1 Dec 2020 06:52:32 +0100 Subject: [PATCH] #62: Fallback to global path, when there is no local path - tests coverage --- test/test_packaging.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/test_packaging.py b/test/test_packaging.py index 081b4dd0..1d88b7ad 100644 --- a/test/test_packaging.py +++ b/test/test_packaging.py @@ -49,6 +49,10 @@ def test_find_resource_directory(self): def test_get_user_site_packages(self): self.assertIsNotNone(rkd.packaging.get_user_site_packages()) + def test_get_user_site_packages_fallbacks_when_no_user_site_packages_directory(self): + with mock.patch('sys.path', returns_value=[]): + self.assertEqual(rkd.packaging._get_global_site_packages(), rkd.packaging.get_user_site_packages()) + def test_functionally_package_contains_complete_misc_directory(self): """ "misc" directory is essential for RKD to work. There were issues with packaging this directory that contains