Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#23291 closed Bug (fixed)

Putting Unicode var name and value in environment causes test suite errors on Windows/Python2

Reported by: Ramiro Morales Owned by: nobody
Component: Core (Management commands) Version: dev
Severity: Normal Keywords:
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

Running the django_admin tests on Windows shows errors like this one:

======================================================================
ERROR: test_noargs (admin_scripts.tests.CommandTypes)
NoArg Commands can be executed
----------------------------------------------------------------------
Traceback (most recent call last):
  File "D:\django\upstream\tests\admin_scripts\tests.py", line 1498, in test_noargs
    out, err = self.run_manage(args)
  File "D:\django\upstream\tests\admin_scripts\tests.py", line 180, in run_manage
    return self.run_test('./manage.py', args, settings_file)
  File "D:\django\upstream\tests\admin_scripts\tests.py", line 149, in run_test
    env=test_environ, universal_newlines=True).communicate()
  File "c:\Python27\lib\subprocess.py", line 679, in __init__
    errread, errwrite)
  File "c:\Python27\lib\subprocess.py", line 893, in _execute_child
    startupinfo)
TypeError: environment can only contain strings

Total number of errors is 114.

Tested on a Windows 7 x86_64 system.

PR is at https://github.com/django/django/pull/3064

Change History (2)

comment:1 by Ramiro Morales, 10 years ago

Resolution: fixed
Status: newclosed

In 0bfb53866199f366ed140d49938fd185e5898156:

Fixed #23291 -- Don't add Unicode varname/value to environment.

comment:2 by Ramiro Morales <cramm0@…>, 10 years ago

In d9559fe163791be263bf8ea406fc287cbbfc9e45:

[1.7.x] Fixed #23291 -- Don't add Unicode varname/value to environment.

Windows doesn't like that and it causes 114 failures in the
admin_scripts tests with Python 2.x.

0bfb53866199f366ed140d49938fd185e5898156 from master.

Note: See TracTickets for help on using tickets.
Back to Top