aboutsummaryrefslogtreecommitdiffstats
path: root/library/python/runtime_py3/test
diff options
context:
space:
mode:
authorshadchin <shadchin@yandex-team.ru>2022-02-10 16:44:39 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:44:39 +0300
commite9656aae26e0358d5378e5b63dcac5c8dbe0e4d0 (patch)
tree64175d5cadab313b3e7039ebaa06c5bc3295e274 /library/python/runtime_py3/test
parent2598ef1d0aee359b4b6d5fdd1758916d5907d04f (diff)
downloadydb-e9656aae26e0358d5378e5b63dcac5c8dbe0e4d0.tar.gz
Restoring authorship annotation for <shadchin@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'library/python/runtime_py3/test')
-rw-r--r--library/python/runtime_py3/test/.dist-info/METADATA28
-rw-r--r--library/python/runtime_py3/test/.dist-info/RECORD2
-rw-r--r--library/python/runtime_py3/test/.dist-info/entry_points.txt4
-rw-r--r--library/python/runtime_py3/test/.dist-info/top_level.txt2
-rw-r--r--library/python/runtime_py3/test/resources/foo.txt2
-rw-r--r--library/python/runtime_py3/test/resources/submodule/bar.txt2
-rw-r--r--library/python/runtime_py3/test/test_metadata.py88
-rw-r--r--library/python/runtime_py3/test/test_resources.py120
-rw-r--r--library/python/runtime_py3/test/ya.make44
9 files changed, 146 insertions, 146 deletions
diff --git a/library/python/runtime_py3/test/.dist-info/METADATA b/library/python/runtime_py3/test/.dist-info/METADATA
index a2af7dff1a..bb36162199 100644
--- a/library/python/runtime_py3/test/.dist-info/METADATA
+++ b/library/python/runtime_py3/test/.dist-info/METADATA
@@ -1,14 +1,14 @@
-Metadata-Version: 2.1
-Name: foo-bar
-Version: 1.2.3
-Summary:
-Home-page: https://foo.org/
-Author: Foo
-Author-email: foo@ya.com
-License: UNKNOWN
-Platform: any
-Classifier: Development Status :: 4 - Beta
-Classifier: Programming Language :: Python :: 3
-Requires-Python: >=3.8
-Requires-Dist: Werkzeug (>=0.15)
-Requires-Dist: Jinja2 (>=2.10.1)
+Metadata-Version: 2.1
+Name: foo-bar
+Version: 1.2.3
+Summary:
+Home-page: https://foo.org/
+Author: Foo
+Author-email: foo@ya.com
+License: UNKNOWN
+Platform: any
+Classifier: Development Status :: 4 - Beta
+Classifier: Programming Language :: Python :: 3
+Requires-Python: >=3.8
+Requires-Dist: Werkzeug (>=0.15)
+Requires-Dist: Jinja2 (>=2.10.1)
diff --git a/library/python/runtime_py3/test/.dist-info/RECORD b/library/python/runtime_py3/test/.dist-info/RECORD
index 4199b6bece..dabbbff80d 100644
--- a/library/python/runtime_py3/test/.dist-info/RECORD
+++ b/library/python/runtime_py3/test/.dist-info/RECORD
@@ -1 +1 @@
-foo_bar.py,sha256=0000000000000000000000000000000000000000000,20
+foo_bar.py,sha256=0000000000000000000000000000000000000000000,20
diff --git a/library/python/runtime_py3/test/.dist-info/entry_points.txt b/library/python/runtime_py3/test/.dist-info/entry_points.txt
index 525429d658..f5e2fd2657 100644
--- a/library/python/runtime_py3/test/.dist-info/entry_points.txt
+++ b/library/python/runtime_py3/test/.dist-info/entry_points.txt
@@ -1,2 +1,2 @@
-[console_scripts]
-foo_cli = foo_bar:cli
+[console_scripts]
+foo_cli = foo_bar:cli
diff --git a/library/python/runtime_py3/test/.dist-info/top_level.txt b/library/python/runtime_py3/test/.dist-info/top_level.txt
index 8009c4b1f1..d2c068bc6b 100644
--- a/library/python/runtime_py3/test/.dist-info/top_level.txt
+++ b/library/python/runtime_py3/test/.dist-info/top_level.txt
@@ -1 +1 @@
-foo_bar
+foo_bar
diff --git a/library/python/runtime_py3/test/resources/foo.txt b/library/python/runtime_py3/test/resources/foo.txt
index 59ea98c2c6..ba0e162e1c 100644
--- a/library/python/runtime_py3/test/resources/foo.txt
+++ b/library/python/runtime_py3/test/resources/foo.txt
@@ -1 +1 @@
-bar \ No newline at end of file
+bar \ No newline at end of file
diff --git a/library/python/runtime_py3/test/resources/submodule/bar.txt b/library/python/runtime_py3/test/resources/submodule/bar.txt
index 356e2c858c..1910281566 100644
--- a/library/python/runtime_py3/test/resources/submodule/bar.txt
+++ b/library/python/runtime_py3/test/resources/submodule/bar.txt
@@ -1 +1 @@
-foo \ No newline at end of file
+foo \ No newline at end of file
diff --git a/library/python/runtime_py3/test/test_metadata.py b/library/python/runtime_py3/test/test_metadata.py
index 7e7d9f0c1c..686c176468 100644
--- a/library/python/runtime_py3/test/test_metadata.py
+++ b/library/python/runtime_py3/test/test_metadata.py
@@ -1,44 +1,44 @@
-import importlib.metadata as im
-
-import pytest
-
-
-@pytest.mark.parametrize("name", ("foo-bar", "foo_bar", "Foo-Bar"))
-def test_distribution(name):
- assert im.distribution(name) is not None
-
-
-def test_unknown_package():
- with pytest.raises(im.PackageNotFoundError):
- im.distribution("bar")
-
-
-def test_version():
- assert im.version("foo-bar") == "1.2.3"
-
-
-def test_metadata():
- assert im.metadata("foo-bar") is not None
-
-
-def test_files():
- files = im.files("foo-bar")
- assert len(files) == 1
- assert files[0].name == "foo_bar.py"
- assert files[0].size == 20
-
-
-def test_requires():
- assert im.requires("foo-bar") == ["Werkzeug (>=0.15)", "Jinja2 (>=2.10.1)"]
-
-
-def test_entry_points():
- entry_points = im.entry_points()
- assert "console_scripts" in entry_points
-
- flg_found = False
- for entry_point in entry_points["console_scripts"]:
- if entry_point.name == "foo_cli" and entry_point.value == "foo_bar:cli":
- flg_found = True
-
- assert flg_found
+import importlib.metadata as im
+
+import pytest
+
+
+@pytest.mark.parametrize("name", ("foo-bar", "foo_bar", "Foo-Bar"))
+def test_distribution(name):
+ assert im.distribution(name) is not None
+
+
+def test_unknown_package():
+ with pytest.raises(im.PackageNotFoundError):
+ im.distribution("bar")
+
+
+def test_version():
+ assert im.version("foo-bar") == "1.2.3"
+
+
+def test_metadata():
+ assert im.metadata("foo-bar") is not None
+
+
+def test_files():
+ files = im.files("foo-bar")
+ assert len(files) == 1
+ assert files[0].name == "foo_bar.py"
+ assert files[0].size == 20
+
+
+def test_requires():
+ assert im.requires("foo-bar") == ["Werkzeug (>=0.15)", "Jinja2 (>=2.10.1)"]
+
+
+def test_entry_points():
+ entry_points = im.entry_points()
+ assert "console_scripts" in entry_points
+
+ flg_found = False
+ for entry_point in entry_points["console_scripts"]:
+ if entry_point.name == "foo_cli" and entry_point.value == "foo_bar:cli":
+ flg_found = True
+
+ assert flg_found
diff --git a/library/python/runtime_py3/test/test_resources.py b/library/python/runtime_py3/test/test_resources.py
index 8eb05380a5..a269329f42 100644
--- a/library/python/runtime_py3/test/test_resources.py
+++ b/library/python/runtime_py3/test/test_resources.py
@@ -1,60 +1,60 @@
-# -*- coding: utf-8 -*-
-
-import importlib.resources as ir
-
-import pytest
-
-
-@pytest.mark.parametrize("package, resource", (
- ("resources", "foo.txt"),
- ("resources.submodule", "bar.txt")
-))
-def test_is_resource_good_path(package, resource):
- assert ir.is_resource(package, resource)
-
-
-@pytest.mark.parametrize("package, resource", (
- ("resources", "111.txt"),
- ("resources.submodule", "222.txt")
-))
-def test_is_resource_missing(package, resource):
- assert not ir.is_resource(package, resource)
-
-
-def test_is_resource_subresource_directory():
- # Directories are not resources.
- assert not ir.is_resource("resources", "submodule")
-
-
-@pytest.mark.parametrize("package, resource, expected", (
- ("resources", "foo.txt", b"bar"),
- ("resources.submodule", "bar.txt", b"foo")
-))
-def test_read_binary_good_path(package, resource, expected):
- assert ir.read_binary(package, resource) == expected
-
-
-def test_read_binary_missing():
- with pytest.raises(FileNotFoundError):
- ir.read_binary("resources", "111.txt")
-
-
-@pytest.mark.parametrize("package, resource, expected", (
- ("resources", "foo.txt", "bar"),
- ("resources.submodule", "bar.txt", "foo")
-))
-def test_read_text_good_path(package, resource, expected):
- assert ir.read_text(package, resource) == expected
-
-
-def test_read_text_missing():
- with pytest.raises(FileNotFoundError):
- ir.read_text("resources", "111.txt")
-
-
-@pytest.mark.parametrize("package, expected", (
- ("resources", ["submodule", "foo.txt"]),
- ("resources.submodule", ["bar.txt"])
-))
-def test_contents_good_path(package, expected):
- assert sorted(ir.contents(package)) == sorted(expected)
+# -*- coding: utf-8 -*-
+
+import importlib.resources as ir
+
+import pytest
+
+
+@pytest.mark.parametrize("package, resource", (
+ ("resources", "foo.txt"),
+ ("resources.submodule", "bar.txt")
+))
+def test_is_resource_good_path(package, resource):
+ assert ir.is_resource(package, resource)
+
+
+@pytest.mark.parametrize("package, resource", (
+ ("resources", "111.txt"),
+ ("resources.submodule", "222.txt")
+))
+def test_is_resource_missing(package, resource):
+ assert not ir.is_resource(package, resource)
+
+
+def test_is_resource_subresource_directory():
+ # Directories are not resources.
+ assert not ir.is_resource("resources", "submodule")
+
+
+@pytest.mark.parametrize("package, resource, expected", (
+ ("resources", "foo.txt", b"bar"),
+ ("resources.submodule", "bar.txt", b"foo")
+))
+def test_read_binary_good_path(package, resource, expected):
+ assert ir.read_binary(package, resource) == expected
+
+
+def test_read_binary_missing():
+ with pytest.raises(FileNotFoundError):
+ ir.read_binary("resources", "111.txt")
+
+
+@pytest.mark.parametrize("package, resource, expected", (
+ ("resources", "foo.txt", "bar"),
+ ("resources.submodule", "bar.txt", "foo")
+))
+def test_read_text_good_path(package, resource, expected):
+ assert ir.read_text(package, resource) == expected
+
+
+def test_read_text_missing():
+ with pytest.raises(FileNotFoundError):
+ ir.read_text("resources", "111.txt")
+
+
+@pytest.mark.parametrize("package, expected", (
+ ("resources", ["submodule", "foo.txt"]),
+ ("resources.submodule", ["bar.txt"])
+))
+def test_contents_good_path(package, expected):
+ assert sorted(ir.contents(package)) == sorted(expected)
diff --git a/library/python/runtime_py3/test/ya.make b/library/python/runtime_py3/test/ya.make
index 9056e48a39..4ec3db74f5 100644
--- a/library/python/runtime_py3/test/ya.make
+++ b/library/python/runtime_py3/test/ya.make
@@ -12,29 +12,29 @@ PEERDIR(
contrib/python/PyYAML
)
-PY_SRCS(
- TOP_LEVEL
- resources/__init__.py
- resources/submodule/__init__.py
-)
-
-TEST_SRCS(
- test_metadata.py
- test_resources.py
- test_traceback.py
+PY_SRCS(
+ TOP_LEVEL
+ resources/__init__.py
+ resources/submodule/__init__.py
+)
+
+TEST_SRCS(
+ test_metadata.py
+ test_resources.py
+ test_traceback.py
test_arcadia_source_finder.py
-)
-
-RESOURCE_FILES(
- PREFIX library/python/runtime_py3/test/
- .dist-info/METADATA
- .dist-info/RECORD
- .dist-info/entry_points.txt
- .dist-info/top_level.txt
- resources/foo.txt
- resources/submodule/bar.txt
-)
-
+)
+
+RESOURCE_FILES(
+ PREFIX library/python/runtime_py3/test/
+ .dist-info/METADATA
+ .dist-info/RECORD
+ .dist-info/entry_points.txt
+ .dist-info/top_level.txt
+ resources/foo.txt
+ resources/submodule/bar.txt
+)
+
END()
RECURSE_FOR_TESTS(traceback)