diff options
author | Tristan Seligmann <mithrandi@debian.org> | 2017-08-11 11:50:14 +0200 |
---|---|---|
committer | Tristan Seligmann <mithrandi@debian.org> | 2017-08-11 11:50:14 +0200 |
commit | f505a84d33c238a892064774ca31854d3b5b1df2 (patch) | |
tree | a67f8519abfc6a529260814e24809d62356fc46a /tests/comprehensive/test_obsstore_on.py | |
parent | ef9caf1c5d12cf3a5886c1eb3ff5bb956fdf482f (diff) |
Upstream snapsnot 1.8.7+1517-b3e41b0d50a2
Diffstat (limited to 'tests/comprehensive/test_obsstore_on.py')
-rw-r--r-- | tests/comprehensive/test_obsstore_on.py | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/tests/comprehensive/test_obsstore_on.py b/tests/comprehensive/test_obsstore_on.py new file mode 100644 index 0000000..7fd4a25 --- /dev/null +++ b/tests/comprehensive/test_obsstore_on.py @@ -0,0 +1,40 @@ +import os +import sys + +# wrapped in a try/except because of weirdness in how +# run.py works as compared to nose. +try: + import test_util +except ImportError: + sys.path.insert(0, os.path.dirname(os.path.dirname(__file__))) + import test_util + +import 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) |