##// END OF EJS Templates
tests: skip a detailed exit status in test-lfs-test-server...
tests: skip a detailed exit status in test-lfs-test-server The mode of failure here differs between `lfs-test-server` and `hg serve`, and they each throw a different exception. The `hg serve` case raises a subclass of `StorageError`, which gets a detailed status. The `lfs-test-server` case raises a subclass of `Abort`, which does not. Since the exit code isn't currently conditionizable in the tests, this is the simplest way to avoid the failure. Differential Revision: https://phab.mercurial-scm.org/D9836

File last commit:

r43829:e170e425 default
r47062:47b11629 stable
Show More
test-dirs.py
27 lines | 644 B | text/x-python | PythonLexer
Augie Fackler
dirs: reject consecutive slashes in paths...
r43799 from __future__ import absolute_import
import unittest
import silenttestrunner
utils: move the `dirs` definition in pathutil (API)...
r43923 from mercurial import pathutil
Augie Fackler
dirs: reject consecutive slashes in paths...
r43799
class dirstests(unittest.TestCase):
def testdirs(self):
for case, want in [
(b'a/a/a', [b'a', b'a/a', b'']),
(b'alpha/beta/gamma', [b'', b'alpha', b'alpha/beta']),
]:
utils: move the `dirs` definition in pathutil (API)...
r43923 d = pathutil.dirs({})
Augie Fackler
dirs: reject consecutive slashes in paths...
r43799 d.addpath(case)
self.assertEqual(sorted(d), sorted(want))
def testinvalid(self):
with self.assertRaises(ValueError):
utils: move the `dirs` definition in pathutil (API)...
r43923 d = pathutil.dirs({})
Augie Fackler
dirs: reject consecutive slashes in paths...
r43799 d.addpath(b'a//b')
if __name__ == '__main__':
silenttestrunner.main(__name__)