test breaks if existing mailman.cfg is found

Bug #543618 reported by Patrick Ben Koetter
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
GNU Mailman
Medium
Barry Warsaw

Bug Description

The test program reports an error if it detects an existing mailman.cfg:

Failure in test test_current_working_directory (mailman.tests.test_configfile.TestConfigFileSearch)
Traceback (most recent call last):
  File "/usr/lib/python2.6/unittest.py", line 279, in run
    testMethod()
  File "/root/mailman/src/mailman/tests/test_configfile.py", line 107, in test_current_working_directory
    self.assertEqual(found, config_file)
  File "/usr/lib/python2.6/unittest.py", line 350, in failUnlessEqual
    (msg or '%r != %r' % (first, second))
AssertionError: '/etc/mailman.cfg' != u'/tmp/tmpVfAIyB/home/alex/mailman/hacking/mailman.cfg'

I believe it should not do this. It should either silently ignore the difference or use the test mailman.cfg or ... but not break.

Barry Warsaw (barry)
Changed in mailman:
milestone: none → 3.0.0a6
Revision history for this message
Barry Warsaw (barry) wrote :

Do you by any chance have $MAILMAN_CONFIG_FILE environment variable set? That's the only way I can see triggering this failure. Still that should not cause test failures because tests should not be dependent on the environment. I'll fix that.

Revision history for this message
Barry Warsaw (barry) wrote :

r6897

Changed in mailman:
status: New → Fix Committed
status: Fix Committed → Confirmed
assignee: nobody → Barry Warsaw (barry)
importance: Undecided → Medium
status: Confirmed → Fix Committed
Revision history for this message
Patrick Ben Koetter (p-state-of-mind) wrote :

Well spotted. I have it set on the machine:
p@mailman:~$ set | grep MAILMAN_CONFIG_FILE
MAILMAN_CONFIG_FILE=/etc/mailman.cfg

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers