Skip to content

Commit

Permalink
[1.2.X] Fixed #14148 -- Ensure the admin_script tests always use an a…
Browse files Browse the repository at this point in the history
…bsolute path; PyPy (and sometimes CPython) return relative paths for __file__. Thanks to Alex Gaynor for the report and patch.

Backport of r13618 from trunk.

git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.2.X@13619 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information
freakboy3742 committed Aug 21, 2010
1 parent 1c3e3d3 commit 5c6fe32
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/regressiontests/admin_scripts/tests.py
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ def run_test(self, script, args, settings_file=None, apps=None):
return out, err return out, err


def run_django_admin(self, args, settings_file=None): def run_django_admin(self, args, settings_file=None):
bin_dir = os.path.dirname(bin.__file__) bin_dir = os.path.abspath(os.path.dirname(bin.__file__))
return self.run_test(os.path.join(bin_dir,'django-admin.py'), args, settings_file) return self.run_test(os.path.join(bin_dir,'django-admin.py'), args, settings_file)


def run_manage(self, args, settings_file=None): def run_manage(self, args, settings_file=None):
Expand Down

0 comments on commit 5c6fe32

Please sign in to comment.