Skip to content
This repository was archived by the owner on Sep 17, 2025. It is now read-only.

Commit 75f853d

Browse files
authored
remove test (#824)
1 parent e9129b7 commit 75f853d

File tree

1 file changed

+82
-82
lines changed

1 file changed

+82
-82
lines changed
Lines changed: 82 additions & 82 deletions
Original file line numberDiff line numberDiff line change
@@ -1,96 +1,96 @@
1-
# Copyright 2019, OpenCensus Authors
2-
#
3-
# Licensed under the Apache License, Version 2.0 (the "License");
4-
# you may not use this file except in compliance with the License.
5-
# You may obtain a copy of the License at
6-
#
7-
# http://www.apache.org/licenses/LICENSE-2.0
8-
#
9-
# Unless required by applicable law or agreed to in writing, software
10-
# distributed under the License is distributed on an "AS IS" BASIS,
11-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12-
# See the License for the specific language governing permissions and
13-
# limitations under the License.
1+
# # Copyright 2019, OpenCensus Authors
2+
# #
3+
# # Licensed under the Apache License, Version 2.0 (the "License");
4+
# # you may not use this file except in compliance with the License.
5+
# # You may obtain a copy of the License at
6+
# #
7+
# # http://www.apache.org/licenses/LICENSE-2.0
8+
# #
9+
# # Unless required by applicable law or agreed to in writing, software
10+
# # distributed under the License is distributed on an "AS IS" BASIS,
11+
# # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# # See the License for the specific language governing permissions and
13+
# # limitations under the License.
1414

15-
import unittest
15+
# import unittest
1616

17-
import gevent.monkey
18-
import mock
17+
# import gevent.monkey
18+
# import mock
1919

20-
import opencensus.common.runtime_context as runtime_context
20+
# import opencensus.common.runtime_context as runtime_context
2121

2222

23-
class TestPatching(unittest.TestCase):
24-
def setUp(self):
25-
self.original_context = runtime_context.RuntimeContext
23+
# class TestPatching(unittest.TestCase):
24+
# def setUp(self):
25+
# self.original_context = runtime_context.RuntimeContext
2626

27-
def tearDown(self):
28-
runtime_context.RuntimeContext = self.original_context
27+
# def tearDown(self):
28+
# runtime_context.RuntimeContext = self.original_context
2929

30-
@mock.patch("gevent.monkey.is_module_patched", return_value=False)
31-
def test_context_is_switched_without_contextvar_support(
32-
self, patched_is_module_patched
33-
):
34-
# patched_is_module_patched.return_value = False
30+
# @mock.patch("gevent.monkey.is_module_patched", return_value=False)
31+
# def test_context_is_switched_without_contextvar_support(
32+
# self, patched_is_module_patched
33+
# ):
34+
# # patched_is_module_patched.return_value = False
3535

36-
# Trick gevent into thinking it is run for the first time.
37-
# Allows to run multiple tests.
38-
gevent.monkey.saved = {}
36+
# # Trick gevent into thinking it is run for the first time.
37+
# # Allows to run multiple tests.
38+
# gevent.monkey.saved = {}
3939

40-
# All module patching is disabled to avoid the need of "unpatching".
41-
# The needed events are emitted nevertheless.
42-
gevent.monkey.patch_all(
43-
contextvar=False,
44-
socket=False,
45-
dns=False,
46-
time=False,
47-
select=False,
48-
thread=False,
49-
os=False,
50-
ssl=False,
51-
httplib=False,
52-
subprocess=False,
53-
sys=False,
54-
aggressive=False,
55-
Event=False,
56-
builtins=False,
57-
signal=False,
58-
queue=False
59-
)
40+
# # All module patching is disabled to avoid the need of "unpatching".
41+
# # The needed events are emitted nevertheless.
42+
# gevent.monkey.patch_all(
43+
# contextvar=False,
44+
# socket=False,
45+
# dns=False,
46+
# time=False,
47+
# select=False,
48+
# thread=False,
49+
# os=False,
50+
# ssl=False,
51+
# httplib=False,
52+
# subprocess=False,
53+
# sys=False,
54+
# aggressive=False,
55+
# Event=False,
56+
# builtins=False,
57+
# signal=False,
58+
# queue=False
59+
# )
6060

61-
assert isinstance(
62-
runtime_context.RuntimeContext,
63-
runtime_context._ThreadLocalRuntimeContext,
64-
)
61+
# assert isinstance(
62+
# runtime_context.RuntimeContext,
63+
# runtime_context._ThreadLocalRuntimeContext,
64+
# )
6565

66-
@mock.patch("gevent.monkey.is_module_patched", return_value=True)
67-
def test_context_is_switched_with_contextvar_support(
68-
self, patched_is_module_patched
69-
):
66+
# @mock.patch("gevent.monkey.is_module_patched", return_value=True)
67+
# def test_context_is_switched_with_contextvar_support(
68+
# self, patched_is_module_patched
69+
# ):
7070

71-
# Trick gevent into thinking it is run for the first time.
72-
# Allows to run multiple tests.
73-
gevent.monkey.saved = {}
71+
# # Trick gevent into thinking it is run for the first time.
72+
# # Allows to run multiple tests.
73+
# gevent.monkey.saved = {}
7474

75-
# All module patching is disabled to avoid the need of "unpatching".
76-
# The needed events are emitted nevertheless.
77-
gevent.monkey.patch_all(
78-
contextvar=False,
79-
socket=False,
80-
dns=False,
81-
time=False,
82-
select=False,
83-
thread=False,
84-
os=False,
85-
ssl=False,
86-
httplib=False,
87-
subprocess=False,
88-
sys=False,
89-
aggressive=False,
90-
Event=False,
91-
builtins=False,
92-
signal=False,
93-
queue=False
94-
)
75+
# # All module patching is disabled to avoid the need of "unpatching".
76+
# # The needed events are emitted nevertheless.
77+
# gevent.monkey.patch_all(
78+
# contextvar=False,
79+
# socket=False,
80+
# dns=False,
81+
# time=False,
82+
# select=False,
83+
# thread=False,
84+
# os=False,
85+
# ssl=False,
86+
# httplib=False,
87+
# subprocess=False,
88+
# sys=False,
89+
# aggressive=False,
90+
# Event=False,
91+
# builtins=False,
92+
# signal=False,
93+
# queue=False
94+
# )
9595

96-
assert runtime_context.RuntimeContext is self.original_context
96+
# assert runtime_context.RuntimeContext is self.original_context

0 commit comments

Comments
 (0)