Skip to content

Commit 365cd4b

Browse files
csferngtensorflow-copybara
authored andcommitted
Drop Python 2 tests.
PiperOrigin-RevId: 317342218
1 parent f27d1e0 commit 365cd4b

File tree

5 files changed

+34
-54
lines changed

5 files changed

+34
-54
lines changed

neural_structured_learning/estimator/BUILD

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,7 @@
1515
# Description:
1616
# Build rules for Estimator APIs in Neural Structured Learning.
1717

18-
# Placeholder for internal Python strict compatibility macro.
19-
load("//devtools/python/blaze:python3.bzl", "py2and3_strict_test")
18+
# Placeholder for internal Python strict & test compatibility macro.
2019

2120
package(
2221
default_visibility = ["//visibility:public"],
@@ -46,11 +45,10 @@ py_library(
4645
],
4746
)
4847

49-
py2and3_strict_test(
48+
py_test(
5049
name = "adversarial_regularization_test",
5150
srcs = ["adversarial_regularization_test.py"],
52-
python_version = "PY3",
53-
srcs_version = "PY2AND3",
51+
srcs_version = "PY3",
5452
deps = [
5553
":estimator",
5654
# package absl/testing:parameterized
@@ -73,11 +71,10 @@ py_library(
7371
],
7472
)
7573

76-
py2and3_strict_test(
74+
py_test(
7775
name = "graph_regularization_test",
7876
srcs = ["graph_regularization_test.py"],
79-
python_version = "PY3",
80-
srcs_version = "PY2AND3",
77+
srcs_version = "PY3",
8178
deps = [
8279
":estimator",
8380
# package protobuf,

neural_structured_learning/keras/BUILD

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,7 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
# Placeholder for internal Python strict compatibility macro.
16-
load("//devtools/python/blaze:python3.bzl", "py2and3_strict_test")
15+
# Placeholder for internal Python strict & test compatibility macro.
1716

1817
# Description:
1918
# Build rules for Keras APIs in Neural Structured Learning.
@@ -48,11 +47,10 @@ py_library(
4847
],
4948
)
5049

51-
py2and3_strict_test(
50+
py_test(
5251
name = "adversarial_regularization_multi_device_test",
5352
srcs = ["adversarial_regularization_multi_device_test.py"],
54-
python_version = "PY3",
55-
srcs_version = "PY2AND3",
53+
srcs_version = "PY3",
5654
deps = [
5755
":adversarial_regularization",
5856
"//neural_structured_learning/configs",
@@ -61,11 +59,10 @@ py2and3_strict_test(
6159
],
6260
)
6361

64-
py2and3_strict_test(
62+
py_test(
6563
name = "adversarial_regularization_test",
6664
srcs = ["adversarial_regularization_test.py"],
67-
python_version = "PY3",
68-
srcs_version = "PY2AND3",
65+
srcs_version = "PY3",
6966
deps = [
7067
":adversarial_regularization",
7168
# package absl/testing:parameterized
@@ -88,12 +85,11 @@ py_library(
8885
],
8986
)
9087

91-
py2and3_strict_test(
88+
py_test(
9289
name = "graph_regularization_test",
9390
timeout = "long",
9491
srcs = ["graph_regularization_test.py"],
95-
python_version = "PY3",
96-
srcs_version = "PY2AND3",
92+
srcs_version = "PY3",
9793
deps = [
9894
":graph_regularization",
9995
# package protobuf,

neural_structured_learning/keras/layers/BUILD

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,7 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
# Placeholder for internal Python strict compatibility macro.
16-
load("//devtools/python/blaze:python3.bzl", "py2and3_strict_test")
15+
# Placeholder for internal Python strict & test compatibility macro.
1716

1817
# Description:
1918
# Build rules for custom Keras layers in Neural Structured Learning.
@@ -35,13 +34,12 @@ py_library(
3534
],
3635
)
3736

38-
py2and3_strict_test(
37+
py_test(
3938
name = "layers_test",
4039
size = "medium",
4140
srcs = [
4241
"layers_test.py",
4342
],
44-
python_version = "PY3",
4543
deps = [
4644
":layers",
4745
# package absl/testing:parameterized
@@ -64,13 +62,12 @@ py_library(
6462
],
6563
)
6664

67-
py2and3_strict_test(
65+
py_test(
6866
name = "neighbor_features_test",
6967
srcs = [
7068
"neighbor_features_test.py",
7169
],
72-
python_version = "PY3",
73-
srcs_version = "PY2AND3",
70+
srcs_version = "PY3",
7471
deps = [
7572
":neighbor_features",
7673
# package absl/testing:parameterized
@@ -95,11 +92,10 @@ py_library(
9592
],
9693
)
9794

98-
py2and3_strict_test(
95+
py_test(
9996
name = "pairwise_distance_test",
10097
srcs = ["pairwise_distance_test.py"],
101-
python_version = "PY3",
102-
srcs_version = "PY2AND3",
98+
srcs_version = "PY3",
10399
deps = [
104100
":pairwise_distance",
105101
"//neural_structured_learning/configs",

neural_structured_learning/lib/BUILD

Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,7 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
# Placeholder for internal Python strict compatibility macro.
16-
load("//devtools/python/blaze:python3.bzl", "py2and3_strict_test")
15+
# Placeholder for internal Python strict & test compatibility macro.
1716

1817
# Description:
1918
# Build rules for libraries and ops in Neural Structured Learning.
@@ -60,11 +59,10 @@ py_library(
6059
],
6160
)
6261

63-
py2and3_strict_test(
62+
py_test(
6463
name = "adversarial_neighbor_test",
6564
srcs = ["adversarial_neighbor_test.py"],
66-
python_version = "PY3",
67-
srcs_version = "PY2AND3",
65+
srcs_version = "PY3",
6866
deps = [
6967
":adversarial_neighbor",
7068
# package absl/testing:parameterized
@@ -85,11 +83,10 @@ py_library(
8583
],
8684
)
8785

88-
py2and3_strict_test(
86+
py_test(
8987
name = "distances_test",
9088
srcs = ["distances_test.py"],
91-
python_version = "PY3",
92-
srcs_version = "PY2AND3",
89+
srcs_version = "PY3",
9390
deps = [
9491
":distances",
9592
"//neural_structured_learning/configs",
@@ -109,11 +106,10 @@ py_library(
109106
],
110107
)
111108

112-
py2and3_strict_test(
109+
py_test(
113110
name = "regularizer_test",
114111
srcs = ["regularizer_test.py"],
115-
python_version = "PY3",
116-
srcs_version = "PY2AND3",
112+
srcs_version = "PY3",
117113
deps = [
118114
":regularizer",
119115
"//neural_structured_learning/configs",
@@ -133,12 +129,11 @@ py_library(
133129
],
134130
)
135131

136-
py2and3_strict_test(
132+
py_test(
137133
name = "utils_test",
138134
size = "small",
139135
srcs = ["utils_test.py"],
140-
python_version = "PY3",
141-
srcs_version = "PY2AND3",
136+
srcs_version = "PY3",
142137
deps = [
143138
":utils",
144139
# package absl/testing:parameterized

neural_structured_learning/tools/BUILD

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,7 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
# Placeholder for internal Python strict compatibility macro.
16-
load("//devtools/python/blaze:python3.bzl", "py2and3_strict_test")
15+
# Placeholder for internal Python strict & test compatibility macro.
1716

1817
# Description:
1918
# Build rules for tools in Neural Structured Learning.
@@ -46,11 +45,10 @@ py_library(
4645
],
4746
)
4847

49-
py2and3_strict_test(
48+
py_test(
5049
name = "graph_utils_test",
5150
srcs = ["graph_utils_test.py"],
52-
python_version = "PY3",
53-
srcs_version = "PY2AND3",
51+
srcs_version = "PY3",
5452
deps = [
5553
":graph_utils",
5654
# package absl/testing:absltest
@@ -71,11 +69,10 @@ py_library(
7169
],
7270
)
7371

74-
py2and3_strict_test(
72+
py_test(
7573
name = "build_graph_test",
7674
srcs = ["build_graph_test.py"],
77-
python_version = "PY3",
78-
srcs_version = "PY2AND3",
75+
srcs_version = "PY3",
7976
deps = [
8077
":build_graph_lib",
8178
":graph_utils",
@@ -108,11 +105,10 @@ py_library(
108105
],
109106
)
110107

111-
py2and3_strict_test(
108+
py_test(
112109
name = "pack_nbrs_test",
113110
srcs = ["pack_nbrs_test.py"],
114-
python_version = "PY3",
115-
srcs_version = "PY2AND3",
111+
srcs_version = "PY3",
116112
deps = [
117113
":graph_utils",
118114
":pack_nbrs_lib",

0 commit comments

Comments
 (0)