Mercurial > python-hglib
comparison tests/test-import.py @ 147:98829bf71f10
util: define BytesIO in one place
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Fri, 13 Mar 2015 12:28:06 -0500 |
parents | 8d7bf729a4db |
children | c1b966866ed7 |
comparison
equal
deleted
inserted
replaced
146:8d7bf729a4db | 147:98829bf71f10 |
---|---|
1 import common, os | 1 import common, os |
2 try: | 2 from hglib.util import b, BytesIO |
3 from io import BytesIO | |
4 except ImportError: | |
5 from cStringIO import StringIO as BytesIO | |
6 import hglib | |
7 from hglib.util import b | |
8 | 3 |
9 patch = b(""" | 4 patch = b(""" |
10 # HG changeset patch | 5 # HG changeset patch |
11 # User test | 6 # User test |
12 # Date 0 0 | 7 # Date 0 0 |