tests/test-cbor.py
changeset 41160 a9905045b992
parent 40125 b638219a23c3
child 41563 1ea1bba1c5be
equal deleted inserted replaced
41159:23d5e03dad70 41160:a9905045b992
     1 from __future__ import absolute_import
     1 from __future__ import absolute_import
     2 
     2 
       
     3 import os
       
     4 import sys
     3 import unittest
     5 import unittest
     4 
     6 
     5 from mercurial.thirdparty import (
     7 # TODO migrate to canned cbor test strings and stop using thirdparty.cbor
     6     cbor,
     8 tpp = os.path.normpath(os.path.join(os.path.dirname(__file__),
     7 )
     9                                     '..', 'mercurial', 'thirdparty'))
       
    10 if not os.path.exists(tpp):
       
    11     # skip, not in a repo
       
    12     sys.exit(80)
       
    13 sys.path[0:0] = [tpp]
       
    14 import cbor
       
    15 del sys.path[0]
       
    16 
     8 from mercurial.utils import (
    17 from mercurial.utils import (
     9     cborutil,
    18     cborutil,
    10 )
    19 )
    11 
    20 
    12 class TestCase(unittest.TestCase):
    21 class TestCase(unittest.TestCase):