From 8f81d735aebd314a5d4aa988b203ff57a558333e Mon Sep 17 00:00:00 2001 From: "jan.dittberner" Date: Tue, 27 Jan 2009 12:57:38 +0000 Subject: [PATCH] apply patch by Toshio Kuratomi to fix some unit tests with Python 2.6 --- test/versioning/test_shell.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/versioning/test_shell.py b/test/versioning/test_shell.py index d0dae2d..8d9f45c 100644 --- a/test/versioning/test_shell.py +++ b/test/versioning/test_shell.py @@ -1,6 +1,7 @@ import sys import traceback from StringIO import StringIO +from types import FileType import os,shutil from test import fixture from migrate.versioning.repository import Repository @@ -19,7 +20,7 @@ class Shell(fixture.Shell): def execute(self,shell_cmd,runshell=None): """A crude simulation of a shell command, to speed things up""" # If we get an fd, the command is already done - if isinstance(shell_cmd,file) or isinstance(shell_cmd,StringIO): + if isinstance(shell_cmd, FileType) or isinstance(shell_cmd, StringIO): return shell_cmd # Analyze the command; see if we can 'fake' the shell try: