Skip to content

Update P3GExtensionsTest.class.st to fix ordered/unordered issue #6

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 4 additions & 7 deletions src/Python3Generator/P3GExtensionsTest.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,9 @@ P3GExtensionsTest >> testCharacterWritePython3On [
{ #category : #'tests-translating' }
P3GExtensionsTest >> testDictionaryWritePython3On [
| dict string |
dict := {
'a' -> 1.
42 -> 'b'.
3 -> 4 } asDictionary.
dict := { 'a' -> 1 } asDictionary.
string := String streamContents: [ :s | dict writePython3On: s ].
self assert: string equals: '{''a'' : 1 , 42 : ''b'' , 3 : 4}'
self assert: string equals: '{''a'' : 1}'
]

{ #category : #'tests-translating' }
Expand Down Expand Up @@ -84,8 +81,8 @@ P3GExtensionsTest >> testSequenceableCollectionWritePython3On [
{ #category : #'tests-translating' }
P3GExtensionsTest >> testSetWritePython3On [
| string |
string := String streamContents: [ :s | #(1 2 3 4) asSet writePython3On: s ].
self assert: string equals: '{1,2,3,4}'.
string := String streamContents: [ :s | #(42) asSet writePython3On: s ].
self assert: string equals: '{42}'.

string := String streamContents: [ :s | Set new writePython3On: s ].
self assert: string equals: 'set()'
Expand Down