Skip to content

Commit

Permalink
Add shuffleBy:
Browse files Browse the repository at this point in the history
Add test
  • Loading branch information
Hernán Morales Durand committed Dec 11, 2023
1 parent b8d743e commit 56d9923
Show file tree
Hide file tree
Showing 18 changed files with 1,118 additions and 1,039 deletions.
46 changes: 24 additions & 22 deletions src/DataFrame-Tests/DataFrameAggrGroupTest.class.st
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
Class {
#name : #DataFrameAggrGroupTest,
#superclass : #TestCase,
#name : 'DataFrameAggrGroupTest',
#superclass : 'TestCase',
#instVars : [
'df'
],
#category : #'DataFrame-Tests-Core'
#category : 'DataFrame-Tests-Core',
#package : 'DataFrame-Tests',
#tag : 'Core'
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

| actual expected rows |
Expand All @@ -99,7 +101,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 56d9923

Please sign in to comment.