summaryrefslogtreecommitdiff
path: root/_test/test_class_register.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/test_class_register.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/test_class_register.py')
-rw-r--r--_test/test_class_register.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/_test/test_class_register.py b/_test/test_class_register.py
index 126d93f..d996269 100644
--- a/_test/test_class_register.py
+++ b/_test/test_class_register.py
@@ -14,7 +14,7 @@ class User0(object):
class User1(object):
- yaml_tag = u'!user'
+ yaml_tag = '!user'
def __init__(self, name, age):
self.name = name
@@ -22,7 +22,7 @@ class User1(object):
@classmethod
def to_yaml(cls, representer, node):
- return representer.represent_scalar(cls.yaml_tag, u'{.name}-{.age}'.format(node, node))
+ return representer.represent_scalar(cls.yaml_tag, '{.name}-{.age}'.format(node, node))
@classmethod
def from_yaml(cls, constructor, node):
@@ -116,7 +116,7 @@ class TestDecorator(object):
@yaml_object(yml)
class User3(object):
- yaml_tag = u'!USER'
+ yaml_tag = '!USER'
def __init__(self, name, age):
self.name = name
@@ -125,7 +125,7 @@ class TestDecorator(object):
@classmethod
def to_yaml(cls, representer, node):
return representer.represent_scalar(
- cls.yaml_tag, u'{.name}-{.age}'.format(node, node)
+ cls.yaml_tag, '{.name}-{.age}'.format(node, node)
)
@classmethod