Opened 13 years ago

Closed 13 years ago

#17468 closed Bug (fixed)

`StartProject.test_simple_project` and `test_simple_project_different_directory` fail under Windows

Reported by: Aymeric Augustin Owned by: Jannis Leidel
Component: Core (Management commands) Version: 1.4-alpha-1
Severity: Release blocker Keywords:
Cc: Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

These tests expect to find the string "File exists" on stderr, but the actual error message is OS-dependent.

======================================================================
FAIL: test_simple_project (regressiontests.admin_scripts.tests.StartProject)
Make sure the startproject management command creates a project
----------------------------------------------------------------------
Traceback (most recent call last):
  File "C:\Documents and Settings\Administrator\Desktop\django-trunk\tests\regressiontests\admin_scripts\tests.py", line
 1387, in test_simple_project
    self.assertOutput(err, "File exists")
  File "C:\Documents and Settings\Administrator\Desktop\django-trunk\tests\regressiontests\admin_scripts\tests.py", line
 175, in assertOutput
    self.assertTrue(msg in stream, "'%s' does not match actual output text '%s'" % (msg, stream))
AssertionError: 'File exists' does not match actual output text 'Error: [Error 183] Cannot create a file when that file
already exists: 'C:\\Documents and Settings\\Administrator\\Desktop\\django-trunk\\tests\\regressiontests\\testproject'
'

======================================================================
FAIL: test_simple_project_different_directory (regressiontests.admin_scripts.tests.StartProject)
Make sure the startproject management command creates a project in a specific directory
----------------------------------------------------------------------
Traceback (most recent call last):
  File "C:\Documents and Settings\Administrator\Desktop\django-trunk\tests\regressiontests\admin_scripts\tests.py", line
 1403, in test_simple_project_different_directory
    self.assertOutput(err, "File exists")
  File "C:\Documents and Settings\Administrator\Desktop\django-trunk\tests\regressiontests\admin_scripts\tests.py", line
 175, in assertOutput
    self.assertTrue(msg in stream, "'%s' does not match actual output text '%s'" % (msg, stream))
AssertionError: 'File exists' does not match actual output text 'Error: [Error 183] Cannot create a file when that file
already exists: 'othertestproject\\testproject'
'

Change History (4)

comment:1 by Aymeric Augustin, 13 years ago

Triage Stage: UnreviewedAccepted

comment:2 by Jannis Leidel, 13 years ago

Owner: changed from nobody to Jannis Leidel

comment:3 by Jannis Leidel, 13 years ago

Version: SVN1.4-alpha-1

comment:4 by Jannis Leidel, 13 years ago

Resolution: fixed
Status: newclosed

In [17377]:

Fixed #17468 -- Made sure the project/app template management command tests correctly handle an existing directory on Windows.

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