netdevops / hier_config

Hierarchical Configuration
MIT License
126 stars 24 forks source link

Fix Issue #75 - Windows File Locking Permission Denied Error on test_load_from_file #76

Closed robobeaver6 closed 4 years ago

robobeaver6 commented 4 years ago

Fixes an issue with the fact that Windows handles temp file locking differently to Linux. This makes the tempfile.NamedTemporaryFile difficult to use as it behaves inconsistently.

Windows was unable to access the temporary test file, due to the locking issue14243

For the test to run, the initial write must be closed first, without deleting the file. The test can then run. Then the file must be manually cleaned up.

robobeaver6 commented 4 years ago

It is failing the Travis Checks because PyYaml will not install on Python 3.4 for some reason PyYAML requires Python '>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*' but the running Python is 3.4.8