mirror of
https://github.com/cool-RR/PySnooper.git
synced 2026-07-23 11:07:15 +00:00
Make tests python2 compatible and add Windows support
This commit is contained in:
parent
772d263276
commit
eda664aa9b
3 changed files with 30 additions and 33 deletions
|
|
@ -35,6 +35,12 @@ def test_ansible_filename_pattern():
|
|||
assert ansible_filename_pattern.match(file_name).group(1) == archive_file
|
||||
assert ansible_filename_pattern.match(file_name).group(2) == source_code_file
|
||||
|
||||
archive_file = 'C:\\Users\\vagrant\\AppData\\Local\\Temp\\pysnooperw5c2lg35\\valid.zip'
|
||||
source_code_file = 'ansible\\modules\\my_valid_zip_module.py'
|
||||
file_name = '%s\\%s' % (archive_file, source_code_file)
|
||||
assert ansible_filename_pattern.match(file_name).group(1) == archive_file
|
||||
assert ansible_filename_pattern.match(file_name).group(2) == source_code_file
|
||||
|
||||
archive_file = '/tmp/ansible_my_module_payload_xyz1234/ansible_my_module_payload.zip'
|
||||
source_code_file = 'ANSIBLE/modules/my_module.py'
|
||||
file_name = '%s/%s' % (archive_file, source_code_file)
|
||||
|
|
@ -64,9 +70,3 @@ def test_ansible_filename_pattern():
|
|||
source_code_file = 'ansible/modules/my_module.py'
|
||||
file_name = '%s/%s' % (archive_file, source_code_file)
|
||||
assert ansible_filename_pattern.match(file_name) is None
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue