diff options
author | steven.bethard <devnull@localhost> | 2010-02-28 06:04:30 +0000 |
---|---|---|
committer | steven.bethard <devnull@localhost> | 2010-02-28 06:04:30 +0000 |
commit | 368317de60c7dcf7c080593270c3fb5a5af1a5ba (patch) | |
tree | f9b2b72df5c21dacf9acf0640f756475efd35a30 | |
parent | 0c7f9144b45ea34d3e38090050c3b64e28218f1b (diff) | |
download | argparse-368317de60c7dcf7c080593270c3fb5a5af1a5ba.tar.gz |
Try to be more robust in tests for non .py files (.pyc and variants).
-rw-r--r-- | test/test_argparse.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/test_argparse.py b/test/test_argparse.py index 8d3e97c..f9e0f24 100644 --- a/test/test_argparse.py +++ b/test/test_argparse.py @@ -4086,8 +4086,8 @@ class TestNamespace(TestCase): class TestEncoding(TestCase): def _test_module_encoding(self, path): - if path.endswith('.pyc'): - path = path[:-1] + path, _ = os.path.splitext(path) + path += ".py" codecs.open(path, 'r', 'utf8').read() def test_argparse_module_encoding(self): |