Преглед изворни кода

Merge pull request #16 from tomlowshang/fix-issue-14

Bastien Sevajol пре 6 година
родитељ
комит
5cd3ed8ed8
No account linked to committer's email
1 измењених фајлова са 4 додато и 5 уклоњено
  1. 4 5
      tests/test_terminals.py

+ 4 - 5
tests/test_terminals.py Прегледај датотеку

@@ -165,8 +165,6 @@ class TestTerminals(BaseTest):
165 165
 
166 166
         terminals_manager.stop()  # TODO pytest must execute this if have fail
167 167
 
168
-    @pytest.mark.skip(reason="Bug: globals fail in python 3.6 "
169
-                             "and still one process when not in debug ...")
170 168
     def test_terminal_as_main_process(self):
171 169
         shared.reset()
172 170
         config = Config()
@@ -179,10 +177,10 @@ class TestTerminals(BaseTest):
179 177
             simulation=simulation,
180 178
         )
181 179
 
182
-        terminal_pid = 0
183
-        core_pid = 0
184 180
         global terminal_pid
185 181
         global core_pid
182
+        terminal_pid = 0
183
+        core_pid = 0
186 184
 
187 185
         class MyMainTerminal(Terminal):
188 186
             main_process = True
@@ -211,7 +209,8 @@ class TestTerminals(BaseTest):
211 209
             ),
212 210
         )
213 211
         core.run()
214
-        core.cycle_manager.process_manager.terminate()
212
+        core.main_process_terminal.core_process.terminate()
213
+        cycle_manager.stop()
215 214
 
216 215
         assert terminal_pid == os.getpid()
217 216
         assert core_pid == 0  # because changed in other process