Skip to content
This repository has been archived by the owner on Jan 14, 2024. It is now read-only.

Commit

Permalink
#27: Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
blackandred committed Jul 16, 2020
1 parent ff6b040 commit b03b85e
Showing 1 changed file with 14 additions and 5 deletions.
19 changes: 14 additions & 5 deletions test/test_standardlib_jinja_render_directory.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,14 @@ def test_iterates_over_subdirectories_including_depth_and_pattern(self):
'source': '../',
'target': '/tmp',
'delete_source_files': False,
'pattern': '(.*)(src|test)/(.*).py$'
'pattern': '(.*)(src|test)/(.*).py$',
'--exclude-pattern': '',
'--copy-not-matching-files': False
})

# example files (please correct if changed in filesystem)
self.assertIn('"../test/test_standardlib_jinja_render_directory.py" -> "/tmp/test/test_standardlib_jinja_render_directory.py"', renderings)
self.assertIn('"../test/test_standardlib_jinja_render_directory.py" ' +
'-> "/tmp/test/test_standardlib_jinja_render_directory.py"', renderings)
self.assertIn('"../src/__init__.py" -> "/tmp/src/__init__.py"', renderings)

# directories should not be included
Expand Down Expand Up @@ -89,7 +92,9 @@ def test_without_pattern(self):
'source': '../',
'target': '/tmp',
'delete_source_files': False,
'pattern': ''
'pattern': '',
'--exclude-pattern': '',
'--copy-not-matching-files': False
})

# example files (please correct if changed in filesystem)
Expand All @@ -102,7 +107,9 @@ def test_no_files_deleted_when_option_disabled(self):
'source': '../',
'target': '/tmp',
'delete_source_files': False,
'pattern': ''
'pattern': '',
'--exclude-pattern': '',
'--copy-not-matching-files': False
})

self.assertEqual([], deletions)
Expand All @@ -112,7 +119,9 @@ def test_files_are_called_to_be_deleted(self):
'source': '../',
'target': '/tmp',
'delete_source_files': True,
'pattern': '(.*)test_standardlib_jinja_render_directory.py$'
'pattern': '(.*)test_standardlib_jinja_render_directory.py$',
'--exclude-pattern': '',
'--copy-not-matching-files': False
})

self.assertEqual(['../test/test_standardlib_jinja_render_directory.py'], deletions)

0 comments on commit b03b85e

Please sign in to comment.