summaryrefslogtreecommitdiff
path: root/_test/lib/test_mark.py
diff options
context:
space:
mode:
authorAnthon van der Neut <anthon@mnt.org>2021-03-09 09:02:50 +0100
committerAnthon van der Neut <anthon@mnt.org>2021-03-09 09:02:50 +0100
commite73562c6f14d1d71a9fea174d58465e1b13f68af (patch)
tree309851cca7d411b31c27753555871d493282c7f0 /_test/lib/test_mark.py
parent96839d9f64f4698bdc519cbfbd48d51178460714 (diff)
downloadruamel.yaml-e73562c6f14d1d71a9fea174d58465e1b13f68af.tar.gz
remove python 2 specific code
add future deprecation warning to old style functions
Diffstat (limited to '_test/lib/test_mark.py')
-rw-r--r--_test/lib/test_mark.py7
1 files changed, 2 insertions, 5 deletions
diff --git a/_test/lib/test_mark.py b/_test/lib/test_mark.py
index 0ff2789..2644a79 100644
--- a/_test/lib/test_mark.py
+++ b/_test/lib/test_mark.py
@@ -1,12 +1,9 @@
-from __future__ import absolute_import
-from __future__ import print_function
import ruamel.yaml as yaml
-from ruamel.yaml.compat import text_type, PY3
def test_marks(marks_filename, verbose=False):
- with open(marks_filename, 'r' if PY3 else 'rb') as fp0:
+ with open(marks_filename, 'r') as fp0:
inputs = fp0.read().split('---\n')[1:]
for input in inputs:
index = 0
@@ -19,7 +16,7 @@ def test_marks(marks_filename, verbose=False):
else:
column += 1
index += 1
- mark = yaml.Mark(marks_filename, index, line, column, text_type(input), index)
+ mark = yaml.Mark(marks_filename, index, line, column, str(input), index)
snippet = mark.get_snippet(indent=2, max_length=79)
if verbose:
print(snippet)