mirror of
https://github.com/sherlock-project/sherlock
synced 2024-11-24 21:03:04 +00:00
Fix platform dependant issues
This commit is contained in:
parent
4aaf0583c5
commit
e5736d3888
1 changed files with 9 additions and 1 deletions
|
@ -1,3 +1,4 @@
|
|||
import os
|
||||
from sherlock_interactives import Interactives
|
||||
import sherlock
|
||||
|
||||
|
@ -6,4 +7,11 @@ def test_versioning() -> None:
|
|||
assert sherlock.__version__ in Interactives.run_cli("--version")
|
||||
# Ensure __init__ is single source of truth for __version__ in package
|
||||
# Temporarily allows sherlock.py so as to not trigger early upgrades
|
||||
assert Interactives.walk_sherlock_for_files_with(r'__version__ *= *') == [ "sherlock/__init__.py", "sherlock/sherlock.py" ]
|
||||
found:list = Interactives.walk_sherlock_for_files_with(r'__version__ *= *')
|
||||
expected:list = [
|
||||
# Normalization is REQUIRED for Windows ( / vs \ )
|
||||
os.path.normpath("sherlock/__init__.py"),
|
||||
os.path.normpath("sherlock/sherlock.py"),
|
||||
]
|
||||
# Sorting is REQUIRED for Mac
|
||||
assert sorted(found) == sorted(expected)
|
||||
|
|
Loading…
Reference in a new issue