diff options
| author | Martijn Jacobs <martijn@devopsconsulting.nl> | 2019-04-24 11:46:55 +0200 |
|---|---|---|
| committer | Carlton Gibson <carlton.gibson@noumenal.es> | 2019-04-24 15:28:20 +0200 |
| commit | 9141da1a80d81b4605594af0a7930b5b011c8e29 (patch) | |
| tree | 1128da67d0a72d3ba9698c6d1bd601870346c5be /tests/utils_tests/utils.py | |
| parent | 8b3f1c35dd848678225e8634d6880efeeab5e796 (diff) | |
Fixed #30366 -- Skipped StatReloaderTests on HFS+ filesystems.
When on MacOS High Sierra or below (<=10.13) it could be that a HFS+
filesystem is used. HFS+ has a time resolution of only one second
which can be too low for some of the tests.
Diffstat (limited to 'tests/utils_tests/utils.py')
| -rw-r--r-- | tests/utils_tests/utils.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/utils_tests/utils.py b/tests/utils_tests/utils.py new file mode 100644 index 0000000000..2aa207287a --- /dev/null +++ b/tests/utils_tests/utils.py @@ -0,0 +1,14 @@ +import platform + + +def on_macos_with_hfs(): + """ + MacOS 10.13 (High Sierra) and lower can use HFS+ as a filesystem. + HFS+ has a time resolution of only one second which can be too low for + some of the tests. + """ + macos_version = platform.mac_ver()[0] + if macos_version != '': + parsed_macos_version = tuple(int(x) for x in macos_version.split('.')) + return parsed_macos_version < (10, 14) + return False |
