Opened 4 years ago

Closed 4 years ago

#17468 closed Bug (fixed)

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

Reported by: aaugustin Owned by: jezdez
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 Changed 4 years ago by aaugustin

  • Triage Stage changed from Unreviewed to Accepted

comment:2 Changed 4 years ago by jezdez

  • Owner changed from nobody to jezdez

comment:3 Changed 4 years ago by jezdez

  • Version changed from SVN to 1.4-alpha-1

comment:4 Changed 4 years ago by jezdez

  • Resolution set to fixed
  • Status changed from new to closed

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