Skip to content

Commit 3178328

Browse files
Restore DOCROOT setting after each test run
Otherwise this can fire sideeffects which might make test_builds fail, but only when another RTDTestCase has run before it.
1 parent 45edfc9 commit 3178328

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

readthedocs/rtd_tests/base.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212

1313
class RTDTestCase(TestCase):
1414
def setUp(self):
15+
self.original_DOCROOT = settings.DOCROOT
1516
self.cwd = os.path.dirname(__file__)
1617
self.build_dir = os.path.join(self.cwd, 'builds')
1718
log.info("build dir: %s" % self.build_dir)
@@ -21,6 +22,7 @@ def setUp(self):
2122

2223
def tearDown(self):
2324
shutil.rmtree(self.build_dir)
25+
settings.DOCROOT = self.original_DOCROOT
2426

2527

2628
@patch('readthedocs.projects.views.private.trigger_build', lambda x, basic: None)

0 commit comments

Comments
 (0)