dve-lumipy-testing 1.0.359__py3-none-any.whl → 1.0.360__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: dve-lumipy-testing
3
- Version: 1.0.359
3
+ Version: 1.0.360
4
4
  Summary: Python library for Luminesce
5
5
  Author: FINBOURNE Technology
6
6
  Author-email: engineering@finbourne.com
@@ -1,5 +1,5 @@
1
1
  lumipy/__init__.py,sha256=Ei0SkyOIPS-aC-ZSdaHwfiH7xWMBelLY-EXJ0--jzUo,443
2
- lumipy/_config_manager.py,sha256=6Xhjp3cYS9nq_YvRkGnwfL4-ZRvqkYjY0ZdRjdodjlI,8617
2
+ lumipy/_config_manager.py,sha256=0ziIk7EyZb44uDw84Pw9UBrY9PmcMYe92WbgF58xylM,8675
3
3
  lumipy/client.py,sha256=UmVdbdwVLz25yVBmqZNG8k9ii86h7g8xKQoA1g-IT0s,22611
4
4
  lumipy/common.py,sha256=wMCeQ8SdCdPiAqyHmVCTy8Wpxs8uJU7sSbYkgu3k5Ls,1701
5
5
  lumipy/query_job.py,sha256=f13vvK1n4czNNg0Jxq8ACrVHdZ20bRQi2rAV_HlfKBA,5395
@@ -78,7 +78,7 @@ lumipy/provider/common.py,sha256=2NMoIDYEkO0km1TcRc_KWZ5NWpo02eBtByKB2_d-mpM,682
78
78
  lumipy/provider/context.py,sha256=VwsHZO46HP3G9BN4Eot_jQlbfETGKyNg2vG5wm1zL_4,5401
79
79
  lumipy/provider/factory.py,sha256=QFuSCT_byJwbFmHF669I2iz0vLAF0T9Or1ghIEUZ0ok,9257
80
80
  lumipy/provider/manager.py,sha256=A4bxCO__m5nc9GL8veOLtySbK1giMNDMml_r3B-q8y8,7218
81
- lumipy/provider/max_version.py,sha256=z5d7eNHYQlie0mHXU3twqfgtxgPAPBA99r-PYHAw3bY,27
81
+ lumipy/provider/max_version.py,sha256=V3_wjW9wgyPlVy40oahUw1oMFOgNx_qmZf3WUWo8aGc,27
82
82
  lumipy/provider/metadata.py,sha256=WGfMv_tLn5W29-zMKipqBpueroe0eF-w9Hj_6QRdZAI,5483
83
83
  lumipy/provider/provider_sets.py,sha256=Z_VyiN2dBP1xuIdRiuGgyzLD7LfO4wxFvodprME2Uls,1478
84
84
  lumipy/provider/implementation/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -290,7 +290,7 @@ lumipy/test/unit/common_tests/test_common.py,sha256=xfKCsC2gXTbc0GJDqADXN9PjSQd4
290
290
  lumipy/test/unit/common_tests/test_table_spec_to_df.py,sha256=FWcjY-omfogWC482w5WtW3ERSmk4-paBtkVMDuF6ris,1662
291
291
  lumipy/test/unit/common_tests/test_widgets.py,sha256=5BbpnUU7Updf0jkVJV-yOURUXJjSL8q49QKrlu6LmqM,2858
292
292
  lumipy/test/unit/config_tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
293
- lumipy/test/unit/config_tests/test_lumipy_config.py,sha256=NQxN13j9PesrmIEWY7jU99aWrM2iyJVZ3ij5xL9aEjA,8945
293
+ lumipy/test/unit/config_tests/test_lumipy_config.py,sha256=-aNRuKJTQQk1P8WY57zOlt6690_L-BCcEmoWYpjDhp0,10546
294
294
  lumipy/test/unit/lumiflex_tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
295
295
  lumipy/test/unit/lumiflex_tests/utils.py,sha256=nJ9Qm8ZT4ssWqHMm_zouREFClYYDCFTkfbuhVT1aMNc,12029
296
296
  lumipy/test/unit/lumiflex_tests/atlas/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -379,8 +379,8 @@ lumipy/test/unit/provider_tests/test_provider_factory.py,sha256=ICHlEiYS-GvKFoI5
379
379
  lumipy/test/unit/provider_tests/test_provider_manager.py,sha256=-TT-3ZGpDsFKMz4efWIy7TGAUVtZ2gTDa67DiorIioc,13456
380
380
  lumipy/test/unit/queryjob_tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
381
381
  lumipy/test/unit/queryjob_tests/test_queryjob.py,sha256=1UE4-VuIkAE6vo0vogq3p2iXtTukiAPxOt5Uankx7c4,1542
382
- dve_lumipy_testing-1.0.359.dist-info/METADATA,sha256=aT10MlXvs3oi0t58pn8d9Sd6TzFVfsUoQpfskv21P44,11856
383
- dve_lumipy_testing-1.0.359.dist-info/WHEEL,sha256=jB7zZ3N9hIM9adW7qlTAyycLYW9npaWKLRzaoVcLKcM,91
384
- dve_lumipy_testing-1.0.359.dist-info/entry_points.txt,sha256=L7hRlqwmvzHMwaOQzygKLK-gx4k4e1q4Qz5m0DGihW8,46
385
- dve_lumipy_testing-1.0.359.dist-info/top_level.txt,sha256=DVww8LaQM3Xm0WOgo4JE0epePgCM1xGWWWxh7wuv-CY,7
386
- dve_lumipy_testing-1.0.359.dist-info/RECORD,,
382
+ dve_lumipy_testing-1.0.360.dist-info/METADATA,sha256=e2XIPlgdmVBRBIBGgi--_ePZMV-Ids0uCaExmMLXIzw,11856
383
+ dve_lumipy_testing-1.0.360.dist-info/WHEEL,sha256=jB7zZ3N9hIM9adW7qlTAyycLYW9npaWKLRzaoVcLKcM,91
384
+ dve_lumipy_testing-1.0.360.dist-info/entry_points.txt,sha256=L7hRlqwmvzHMwaOQzygKLK-gx4k4e1q4Qz5m0DGihW8,46
385
+ dve_lumipy_testing-1.0.360.dist-info/top_level.txt,sha256=DVww8LaQM3Xm0WOgo4JE0epePgCM1xGWWWxh7wuv-CY,7
386
+ dve_lumipy_testing-1.0.360.dist-info/RECORD,,
lumipy/_config_manager.py CHANGED
@@ -59,9 +59,10 @@ class ConfigManager:
59
59
  try:
60
60
  self.cfg_path.mkdir(parents=True, exist_ok=True)
61
61
  self.cfg_file.touch(exist_ok=True)
62
- except PermissionError:
62
+ except (PermissionError, OSError) as e:
63
+ err_type = type(e).__name__
63
64
  print(
64
- "Warning: can't write config file to $HOME/.lumipy due to permissions. "
65
+ f"Warning: can't write config file to $HOME/.lumipy (Caught {err_type}). "
65
66
  "You will not be able to register and use PATs, so should use another auth method such as env vars or "
66
67
  "**kwargs. "
67
68
  )
@@ -1 +1 @@
1
- max_version_str = '1.18.89'
1
+ max_version_str = '1.18.97'
@@ -1,9 +1,11 @@
1
1
  import unittest
2
+ from contextlib import redirect_stdout
2
3
  from lumipy._config_manager import ConfigManager
3
4
  from pathlib import Path
4
5
  import tempfile
5
6
  import shutil
6
-
7
+ import io
8
+ from unittest.mock import patch
7
9
 
8
10
  class TestLumipyConfig(unittest.TestCase):
9
11
 
@@ -272,3 +274,34 @@ class TestLumipyConfig(unittest.TestCase):
272
274
 
273
275
  s = str(ve.exception)
274
276
  self.assertIn(f'Domain fbn-dom not found in config. You can add it with config.add("fbn-dom", <PAT>).', s)
277
+
278
+ def test_init_config_manager_permission_error(self):
279
+ with patch.object(Path, "mkdir", side_effect=PermissionError("Mocked PermissionError")):
280
+ captured_output = io.StringIO()
281
+ with redirect_stdout(captured_output):
282
+ try:
283
+ _ = ConfigManager('config')
284
+ except Exception as e:
285
+ self.fail(f"ConfigManager raised an error instead of handling it. Error: {e}")
286
+
287
+ output = captured_output.getvalue()
288
+ self.assertIn(
289
+ "Warning: can't write config file to $HOME/.lumipy (Caught PermissionError). You will not be able to register and use PATs, so should use another auth method such as env vars or **kwargs.",
290
+ output
291
+ )
292
+
293
+
294
+ def test_init_config_manager_os_error(self):
295
+ with patch.object(Path, "mkdir", side_effect=OSError("Mocked OSError")):
296
+ captured_output = io.StringIO()
297
+ with redirect_stdout(captured_output):
298
+ try:
299
+ _ = ConfigManager('config')
300
+ except Exception as e:
301
+ self.fail(f"ConfigManager raised an error instead of handling it. Error: {e}")
302
+
303
+ output = captured_output.getvalue()
304
+ self.assertIn(
305
+ "Warning: can't write config file to $HOME/.lumipy (Caught OSError). You will not be able to register and use PATs, so should use another auth method such as env vars or **kwargs.",
306
+ output
307
+ )