Permalink
Browse files

Fixed bad usage of rstrip() that caused test failure.

If the temporary file name contained a p or y as its last
characters, it would be stripped. refs #23083.
  • Loading branch information...
timgraham committed Jul 25, 2014
1 parent b8cb5ba commit 57d2b3f2a7e5a7fafb99efc9d93e67bc98feea1b
Showing with 1 addition and 1 deletion.
  1. +1 −1 tests/utils_tests/test_autoreload.py
@@ -90,7 +90,7 @@ def test_deleted_removed(self):
_, filepath = tempfile.mkstemp(dir=os.path.dirname(upath(__file__)), suffix='.py')
try:
_, filename = os.path.split(filepath)
- import_module('.%s' % filename.rstrip('.py'), package='utils_tests')
+ import_module('.%s' % filename.replace('.py', ''), package='utils_tests')
self.assertIn(filepath, gen_filenames())
finally:
os.remove(filepath)

0 comments on commit 57d2b3f

Please sign in to comment.