Skip to content

Commit

Permalink
Adapted test to work around different RNG implementation in Pharo ver…
Browse files Browse the repository at this point in the history
…sions 12 and above
  • Loading branch information
Hernán Morales Durand committed Dec 14, 2023
1 parent 07d97ca commit c4df4c1
Show file tree
Hide file tree
Showing 8 changed files with 700 additions and 669 deletions.
46 changes: 22 additions & 24 deletions src/DataFrame-Tests/DataFrameAggrGroupTest.class.st
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
Class {
#name : 'DataFrameAggrGroupTest',
#superclass : 'TestCase',
#name : #DataFrameAggrGroupTest,
#superclass : #TestCase,
#instVars : [
'df'
],
#category : 'DataFrame-Tests-Core',
#package : 'DataFrame-Tests',
#tag : 'Core'
#category : 'DataFrame-Tests-Core'
}

{ #category : 'running' }
{ #category : #running }
DataFrameAggrGroupTest >> setUp [

super setUp.
Expand All @@ -21,7 +19,7 @@ DataFrameAggrGroupTest >> setUp [
df columnNames: #( total_bill tip sex smoker day time size )
]

{ #category : 'tests' }
{ #category : #tests }
DataFrameAggrGroupTest >> testGroupByAggregateArrayMultipleUsingAsSelector [
| expected actual |

Expand All @@ -44,7 +42,7 @@ DataFrameAggrGroupTest >> testGroupByAggregateArrayMultipleUsingAsSelector [
self assert: actual equals: expected
]

{ #category : 'tests' }
{ #category : #tests }
DataFrameAggrGroupTest >> testGroupByAggregateArrayUsingAsBlock [
| expected actual |

Expand All @@ -60,7 +58,7 @@ DataFrameAggrGroupTest >> testGroupByAggregateArrayUsingAsBlock [
self assert: actual equals: expected
]

{ #category : 'tests' }
{ #category : #tests }
DataFrameAggrGroupTest >> testGroupByAggregateArrayUsingAsNoSuchAggregateColumnError [
self
should: [
Expand All @@ -69,7 +67,7 @@ DataFrameAggrGroupTest >> testGroupByAggregateArrayUsingAsNoSuchAggregateColumnE
raise: Error
]

{ #category : 'tests' }
{ #category : #tests }
DataFrameAggrGroupTest >> testGroupByAggregateArrayUsingAsNoSuchGroupColumnError [
self
should: [
Expand All @@ -78,7 +76,7 @@ DataFrameAggrGroupTest >> testGroupByAggregateArrayUsingAsNoSuchGroupColumnError
raise: Error
]

{ #category : 'tests' }
{ #category : #tests }
DataFrameAggrGroupTest >> testGroupByAggregateArrayUsingAsSameColumnError [
self
should: [
Expand All @@ -87,7 +85,7 @@ DataFrameAggrGroupTest >> testGroupByAggregateArrayUsingAsSameColumnError [
raise: Error
]

{ #category : 'tests' }
{ #category : #tests }
DataFrameAggrGroupTest >> testGroupByAggregateArrayUsingAsSelector [
| expected actual |

Expand All @@ -103,7 +101,7 @@ DataFrameAggrGroupTest >> testGroupByAggregateArrayUsingAsSelector [
self assert: actual equals: expected
]

{ #category : 'tests' }
{ #category : #tests }
DataFrameAggrGroupTest >> testGroupByAggregateArrayUsingBlock [
| expected actual |

Expand All @@ -119,7 +117,7 @@ DataFrameAggrGroupTest >> testGroupByAggregateArrayUsingBlock [
self assert: actual equals: expected
]

{ #category : 'tests' }
{ #category : #tests }
DataFrameAggrGroupTest >> testGroupByAggregateArrayUsingSelector [
| expected actual |

Expand All @@ -135,7 +133,7 @@ DataFrameAggrGroupTest >> testGroupByAggregateArrayUsingSelector [
self assert: actual equals: expected
]

{ #category : 'tests' }
{ #category : #tests }
DataFrameAggrGroupTest >> testGroupByAggregateUsingAsBlock [
| expected actual |

Expand All @@ -153,7 +151,7 @@ DataFrameAggrGroupTest >> testGroupByAggregateUsingAsBlock [
self assert: actual equals: expected
]

{ #category : 'tests' }
{ #category : #tests }
DataFrameAggrGroupTest >> testGroupByAggregateUsingAsNoSuchAggregateColumnError [
self
should: [
Expand All @@ -164,7 +162,7 @@ DataFrameAggrGroupTest >> testGroupByAggregateUsingAsNoSuchAggregateColumnError
raise: Error
]

{ #category : 'tests' }
{ #category : #tests }
DataFrameAggrGroupTest >> testGroupByAggregateUsingAsNoSuchGroupColumnError [
self
should: [
Expand All @@ -175,7 +173,7 @@ DataFrameAggrGroupTest >> testGroupByAggregateUsingAsNoSuchGroupColumnError [
raise: Error
]

{ #category : 'tests' }
{ #category : #tests }
DataFrameAggrGroupTest >> testGroupByAggregateUsingAsSameColumnError [
self
should: [
Expand All @@ -186,7 +184,7 @@ DataFrameAggrGroupTest >> testGroupByAggregateUsingAsSameColumnError [
raise: Error
]

{ #category : 'tests' }
{ #category : #tests }
DataFrameAggrGroupTest >> testGroupByAggregateUsingAsSelector [
| expected actual |

Expand All @@ -204,7 +202,7 @@ DataFrameAggrGroupTest >> testGroupByAggregateUsingAsSelector [
self assert: actual equals: expected
]

{ #category : 'tests' }
{ #category : #tests }
DataFrameAggrGroupTest >> testGroupByAggregateUsingBlock [
| expected actual |

Expand All @@ -221,7 +219,7 @@ DataFrameAggrGroupTest >> testGroupByAggregateUsingBlock [
self assert: actual equals: expected
]

{ #category : 'tests' }
{ #category : #tests }
DataFrameAggrGroupTest >> testGroupByAggregateUsingNoSuchAggregateColumnError [
self
should: [
Expand All @@ -231,7 +229,7 @@ DataFrameAggrGroupTest >> testGroupByAggregateUsingNoSuchAggregateColumnError [
raise: Error
]

{ #category : 'tests' }
{ #category : #tests }
DataFrameAggrGroupTest >> testGroupByAggregateUsingNoSuchGroupColumnError [
self
should: [
Expand All @@ -241,7 +239,7 @@ DataFrameAggrGroupTest >> testGroupByAggregateUsingNoSuchGroupColumnError [
raise: Error
]

{ #category : 'tests' }
{ #category : #tests }
DataFrameAggrGroupTest >> testGroupByAggregateUsingSameColumnError [
self
should: [
Expand All @@ -251,7 +249,7 @@ DataFrameAggrGroupTest >> testGroupByAggregateUsingSameColumnError [
raise: Error
]

{ #category : 'tests' }
{ #category : #tests }
DataFrameAggrGroupTest >> testGroupByAggregateUsingSelector [
| expected actual |

Expand Down
20 changes: 9 additions & 11 deletions src/DataFrame-Tests/DataFrameHeadTailTest.class.st
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
Class {
#name : 'DataFrameHeadTailTest',
#superclass : 'TestCase',
#name : #DataFrameHeadTailTest,
#superclass : #TestCase,
#instVars : [
'df',
'series'
],
#category : 'DataFrame-Tests-Core',
#package : 'DataFrame-Tests',
#tag : 'Core'
#category : 'DataFrame-Tests-Core'
}

{ #category : 'running' }
{ #category : #running }
DataFrameHeadTailTest >> setUp [

super setUp.
Expand All @@ -23,7 +21,7 @@ DataFrameHeadTailTest >> setUp [
series := df column: #sepalLength
]

{ #category : 'tests' }
{ #category : #tests }
DataFrameHeadTailTest >> testDataFrameHead [

| actual expected |
Expand All @@ -42,7 +40,7 @@ DataFrameHeadTailTest >> testDataFrameHead [
self assert: actual equals: expected
]

{ #category : 'tests' }
{ #category : #tests }
DataFrameHeadTailTest >> testDataFrameHeadN [

| actual expected |
Expand All @@ -59,7 +57,7 @@ DataFrameHeadTailTest >> testDataFrameHeadN [
self assert: actual equals: expected
]

{ #category : 'tests' }
{ #category : #tests }
DataFrameHeadTailTest >> testDataFrameTail [

| actual expected rows |
Expand All @@ -81,7 +79,7 @@ DataFrameHeadTailTest >> testDataFrameTail [
self assert: actual equals: expected
]

{ #category : 'tests' }
{ #category : #tests }
DataFrameHeadTailTest >> testDataFrameTailN [

| actual expected rows |
Expand All @@ -101,7 +99,7 @@ DataFrameHeadTailTest >> testDataFrameTailN [
self assert: actual equals: expected
]

{ #category : 'tests' }
{ #category : #tests }
DataFrameHeadTailTest >> testDefaultHeadTailSize [

self assert: df defaultHeadTailSize equals: 5
Expand Down
Loading

0 comments on commit c4df4c1

Please sign in to comment.