Page MenuHomePhabricator

Math tests leave HTML files behind
Closed, ResolvedPublic

Description

Seen it in r945814: running MMLGenerationParserTest leaves an HTML file behind in the tests directory that is not cleaned up. The test should at the very least delete the file when it finishes, and even better would be creating the file in the tmp (or equivalent) directory. I was going to fix this, but looking at this test it looks like it's just a WIP or something:

  • It uses lots of private static properties that are really constants, and some parts of the test code are unreachable
  • It has @group stub
  • It has redundant overrides for setUp and tearDown
  • There are 2 other tests that also have code for generating an HTML file: MMLFullCoverageTest and MMLGenerationTexUtilTest. These also use constant properties that effectively disable some parts of the tests, including the code which generates the HTML file.

Given all this, I'd rather not touch these tests, and leave it up to the maintainers to do what they think would be best.

Event Timeline

Change 960000 had a related patch set uploaded (by Stegmujo; author: Stegmujo):

[mediawiki/extensions/Math@master] Fix MMLGenerationParserTest creating HTML file

https://gerrit.wikimedia.org/r/960000

Change 960000 merged by jenkins-bot:

[mediawiki/extensions/Math@master] Fix MMLGenerationParserTest creating HTML file

https://gerrit.wikimedia.org/r/960000