Browse Source

update tests for ymake plugins

snermolaev 1 year ago
parent
commit
52e89a78c6

+ 1 - 0
build/plugins/lib/proxy/_metric_resolvers.py

@@ -0,0 +1 @@
+from build.plugins.lib._metric_resolvers import *  # noqa: F403, F401

+ 13 - 0
build/plugins/lib/proxy/ya.make

@@ -0,0 +1,13 @@
+OWNER(g:ymake)
+
+PY23_LIBRARY()
+
+PY_SRCS(
+    _metric_resolvers.py=lib._metric_resolvers
+)
+
+PEERDIR(
+    build/plugins/lib
+)
+
+END()

+ 1 - 0
build/plugins/lib/test_const/proxy/__init__.py

@@ -0,0 +1 @@
+from build.plugins.lib.test_const import *  # noqa: F403, F401

+ 13 - 0
build/plugins/lib/test_const/proxy/ya.make

@@ -0,0 +1,13 @@
+OWNER(g:ymake)
+
+PY23_LIBRARY()
+
+PY_SRCS(
+    __init__.py=lib.test_const
+)
+
+PEERDIR(
+    build/plugins/lib/test_const
+)
+
+END()

+ 1 - 1
build/plugins/lib/test_const/ya.make

@@ -3,7 +3,7 @@ OWNER(g:ymake)
 PY23_LIBRARY()
 
 PY_SRCS(
-   __init__.py
+    __init__.py
 )
 
 END()

+ 9 - 7
build/plugins/lib/ya.make

@@ -1,7 +1,9 @@
-OWNER(g:ymake)
-
-PY23_LIBRARY()
-    PY_SRCS(
-       _metric_resolvers.py
-    )
-END()
+OWNER(g:ymake)
+
+PY23_LIBRARY()
+
+PY_SRCS(
+    _metric_resolvers.py
+)
+
+END()

+ 0 - 0
build/plugins/tests/fake_ymake.py → build/plugins/tests/fake_ymake/__init__.py


+ 9 - 0
build/plugins/tests/fake_ymake/ya.make

@@ -0,0 +1,9 @@
+OWNER(g:ymake)
+
+PY23_LIBRARY()
+
+PY_SRCS(
+    __init__.py=ymake
+)
+
+END()

+ 1 - 6
build/plugins/tests/test_code_generator.py

@@ -1,9 +1,4 @@
-import sys
-from build.plugins.tests import fake_ymake
-
-sys.modules['ymake'] = fake_ymake
-
-from build.plugins import code_generator
+import code_generator
 
 
 def test_include_parser():

+ 1 - 2
build/plugins/tests/test_common.py

@@ -1,6 +1,5 @@
 import pytest
-
-import build.plugins._common as pc
+import _common as pc
 
 
 def test_sort_by_keywords():

Some files were not shown because too many files changed in this diff