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:17:18 -0400 |
| commit | d1c08d4758998318eb1a881a3963b63bc89435b8 (patch) | |
| tree | a1529e7230712608e5da678b584baaa6634196bf | |
| parent | 4f8a5bd8d0f14280b25e4389b881f9f719159c38 (diff) | |
[1.7.x] 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.
Backport of 57d2b3f2a7 from master
| -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) |
