Skip to content

Instantly share code, notes, and snippets.

@asmeurer
Created June 16, 2011 05:45
Show Gist options
  • Save asmeurer/1028738 to your computer and use it in GitHub Desktop.
Save asmeurer/1028738 to your computer and use it in GitHub Desktop.
skip codegen tests in Python 2.4 windows
diff --git a/sympy/test_external/test_codegen.py b/sympy/test_external/test_codegen.py
index 5245b79..9e2c5ac 100644
--- a/sympy/test_external/test_codegen.py
+++ b/sympy/test_external/test_codegen.py
@@ -33,6 +33,11 @@
import tempfile
import subprocess
+if sys.platform == 'win32' and sys.version_info < (2, 5):
+ # subprocess has problems in Windows Python 2.4, so skip the tests there
+ disabled = True
+else:
+ disabled = False
# templates for the main program that will test the generated code.
@@ -251,14 +256,15 @@ def is_feasible(language, commands):
except AssertionError:
return False
-valid_lang_commands = []
-invalid_lang_compilers = []
-for lang, compiler in combinations_lang_compiler:
- commands = compile_commands[compiler]
- if is_feasible(lang, commands):
- valid_lang_commands.append((lang, commands))
- else:
- invalid_lang_compilers.append((lang, compiler))
+if not disabled:
+ valid_lang_commands = []
+ invalid_lang_compilers = []
+ for lang, compiler in combinations_lang_compiler:
+ commands = compile_commands[compiler]
+ if is_feasible(lang, commands):
+ valid_lang_commands.append((lang, commands))
+ else:
+ invalid_lang_compilers.append((lang, compiler))
# We test all language-compiler combinations, just to report what is skipped
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment