diff options
| author | Tim Graham <timograham@gmail.com> | 2014-07-25 15:11:34 -0400 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2014-07-25 15:16:47 -0400 |
| commit | 57d2b3f2a7e5a7fafb99efc9d93e67bc98feea1b (patch) | |
| tree | 079be32ec8797b07d9968c81d833d0085d97a0ac | |
| parent | b8cb5ba7081388ef38eccdf8e826747ad3a67e66 (diff) | |
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.
| -rw-r--r-- | tests/utils_tests/test_autoreload.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/utils_tests/test_autoreload.py b/tests/utils_tests/test_autoreload.py index 1edf3f9bf8..c2739ce7e6 100644 --- a/tests/utils_tests/test_autoreload.py +++ b/tests/utils_tests/test_autoreload.py @@ -90,7 +90,7 @@ class TestFilenameGenerator(TestCase): _, 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) |
