forked from ObjectProfile/PythonBridge
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathPBProcessTest.class.st
More file actions
55 lines (47 loc) · 1.17 KB
/
PBProcessTest.class.st
File metadata and controls
55 lines (47 loc) · 1.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
Class {
#name : #PBProcessTest,
#superclass : #TestCase,
#instVars : [
'process',
'tmpPythonFile'
],
#category : #'PythonBridge-Platform'
}
{ #category : #testing }
PBProcessTest class >> isAbstract [
^ self == PBProcessTest
]
{ #category : #running }
PBProcessTest >> defaultSettings [
^ PBSettings
pharoSocketAddress: (LanguageLinkSocketAddress ipOrName: 'localhost' port: 6538)
pythonSocketAddress: (LanguageLinkSocketAddress ipOrName: 'localhost' port: 6539)
]
{ #category : #running }
PBProcessTest >> defaultTmpFile [
self subclassResponsibility
]
{ #category : #hooks }
PBProcessTest >> processClass [
self subclassResponsibility
]
{ #category : #running }
PBProcessTest >> setUp [
super setUp.
process := self processClass application: PBApplication new.
process pythonMainFile: (process workingDirectory resolve resolve: self defaultTmpFile)
]
{ #category : #running }
PBProcessTest >> tearDown [
process stop.
super tearDown
]
{ #category : #running }
PBProcessTest >> testStartStopProcess [
self deny: process isRunning.
process start.
self assert: process isRunning.
process stop.
(Delay forMilliseconds: 150) wait.
self deny: process isRunning
]