sapling/tests/comprehensive/test-hgsubversion-obsstore-on.py
Jun Wu a487dacc4b codemod: reformat rest of the code
Summary:
Previous code format attempt (D8173629) didn't cover all files due to `**/*.py`
was not expanded recursively by bash. That makes certain changes larger than
they should be (ex. D8675439). Now use zsh's `**/*.py` to format them.

Also fix Python syntax so black can run on more files, and all lint issues.

Reviewed By: phillco

Differential Revision: D8696912

fbshipit-source-id: 95f07aa0c5eb1b63947b0f77f534957f4ab65364
2018-07-05 17:52:43 -07:00

43 lines
1017 B
Python

# no-check-code -- see T24862348
import os
import sys
import test_hgsubversion_util
test_push_command = test_hgsubversion_util.import_test("test_push_command")
class ObsstoreOnMixIn(object):
# do not double the test size by being wrapped again
obsolete_mode_tests = False
stupid_mode_tests = False
def setUp(self):
super(ObsstoreOnMixIn, self).setUp()
hgrcpath = os.environ.get("HGRCPATH")
assert hgrcpath
with open(hgrcpath, "a") as f:
f.write("\n[experimental]\nevolution=createmarkers\n")
def shortDescription(self):
text = super(ObsstoreOnMixIn, self).shortDescription()
if text:
text += " (obsstore on)"
return text
def buildtestclass(cls):
name = "ObsstoreOn%s" % cls.__name__
newcls = type(name, (ObsstoreOnMixIn, cls), {})
globals()[name] = newcls
buildtestclass(test_push_command.PushTests)
if __name__ == "__main__":
import silenttestrunner
silenttestrunner.main(__name__)