#3700 closed defect (fixed)
Unit tests don't take /etc/trac.ini into account
Reported by: | Manuzhai | Owned by: | Christian Boos |
---|---|---|---|
Priority: | low | Milestone: | 0.10 |
Component: | general | Version: | 0.10b1 |
Severity: | minor | Keywords: | |
Cc: | manuzhai@… | Branch: | |
Release Notes: | |||
API Changes: | |||
Internal Changes: |
Description
I'm working on a community buildbot testing Trac against Python trunk and Python 2.5. As part of this, I'm first checking to see if the unit tests succeed against Python 2.4 (so that any failures turning up in the buildbot aren't false positives).
trac/tests/config.py has the test_sections.py(), but it's failing for me:
====================================================================== FAIL: test_sections (trac.tests.config.ConfigurationTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/manuzhai/src/trac/trac/tests/config.py", line 150, in test_sections self.assertEquals(['a', 'b'], config.sections()) AssertionError: ['a', 'b'] != ['a', 'attachment', 'b', 'components', 'header_logo', 'logging', 'mimeviewer', 'notification', 'project', 'ticket', 'timeline', 'trac'] ----------------------------------------------------------------------
I'd say this is because I have an /etc/trac.ini that's taken into account by the Configuration class, and so this test should succeed. There should probably be tests to take into account /etc/trac.ini, or an option to ignore the central .ini.
Attachments (1)
Change History (6)
comment:1 by , 18 years ago
Milestone: | → 0.10.1 |
---|---|
Owner: | changed from | to
Status: | new → assigned |
comment:2 by , 18 years ago
Looking at #3701, it seems that it would be a better idea if all the unit tests could be insulated from the global trac.ini.
attachment:3700.diff does that, on top of r3717.
Depending on feedback, might go in milestone:0.10.
comment:3 by , 18 years ago
I would agree that it would be a good idea to not look at the global trac.ini.
I hope this can go in.
comment:4 by , 18 years ago
comment:5 by , 18 years ago
Milestone: | 0.10.1 → 0.10 |
---|---|
Resolution: | → fixed |
Status: | assigned → closed |
I think we should find a way to programmatically set the global trac.ini file. That would fix the issue and enable us to unit-test the behavior of the global trac.ini.
e.g.