Skip to content

Commit

Permalink
remove special handling code for old Python versions from tests
Browse files Browse the repository at this point in the history
  • Loading branch information
scoder committed Apr 5, 2014
1 parent 78e08f8 commit 1283992
Showing 1 changed file with 2 additions and 14 deletions.
16 changes: 2 additions & 14 deletions test.py
Expand Up @@ -457,8 +457,8 @@ def main(argv):
"""Main program."""

# Environment
if sys.version_info < (2, 3):
stderr('%s: need Python 2.3 or later' % argv[0])
if sys.version_info < (2, 6):
stderr('%s: need Python 2.6 or later' % argv[0])
stderr('your python is %s' % sys.version)
return 1

Expand Down Expand Up @@ -562,18 +562,6 @@ def main(argv):
# Finding and importing
test_files = get_test_files(cfg)

if sys.version_info[:2] < (2,5):
# exclude tests that require the 'with' statement
test_files = [
test_file for test_file in test_files
if 'test_incremental_xmlfile.py' not in test_file]

if sys.version_info[:2] < (2,6):
# exclude tests that require recent Python features
test_files = [
test_file for test_file in test_files
if 'test_http_io.py' not in test_file]

if cfg.list_tests or cfg.run_tests:
test_cases = get_test_cases(test_files, cfg, tracer=tracer)
if cfg.list_hooks or cfg.run_tests:
Expand Down

0 comments on commit 1283992

Please sign in to comment.