Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
RSE 23 Group Assignment Shervud Pitawanik Franz
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
Niklas Franz
RSE 23 Group Assignment Shervud Pitawanik Franz
Commits
e2f46cce
Commit
e2f46cce
authored
1 year ago
by
Sortofamudkip
Browse files
Options
Downloads
Patches
Plain Diff
fixed tests to use string param instead of Pathlib
parent
5d56375f
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/test_dataset.py
+3
-3
3 additions, 3 deletions
src/test_dataset.py
src/test_plotter.py
+1
-1
1 addition, 1 deletion
src/test_plotter.py
with
4 additions
and
4 deletions
src/test_dataset.py
+
3
−
3
View file @
e2f46cce
...
...
@@ -12,13 +12,13 @@ this_file_dir = Path(__file__).parent
@pytest.fixture
def
the_dataset
()
->
Dataset
:
dataset
=
Dataset
(
this_file_dir
/
"
../data/GamingStudy_data.csv
"
)
dataset
=
Dataset
(
str
(
this_file_dir
/
"
../data/GamingStudy_data.csv
"
)
)
return
dataset
def
test_load_Dataset_class
():
"""
Tests if the dataset is successfully loaded.
"""
dataset
=
Dataset
(
this_file_dir
/
"
../data/GamingStudy_data.csv
"
)
dataset
=
Dataset
(
str
(
this_file_dir
/
"
../data/GamingStudy_data.csv
"
)
)
assert
type
(
dataset
)
==
Dataset
assert
type
(
dataset
.
dataframe
)
==
pd
.
DataFrame
...
...
@@ -55,5 +55,5 @@ def test_preprocessed_dataframe(the_dataset: Dataset):
def
test_get_sorted_columns
(
the_dataset
:
Dataset
):
"""
Tests Dataset.get_sorted_column().
"""
sorted_GAD1
=
the_dataset
.
get_sorted_column
(
"
GAD
1
"
)
sorted_GAD1
=
the_dataset
.
get_sorted_column
(
"
GAD
_T
"
)
assert
sorted_GAD1
.
iloc
[
0
]
<=
sorted_GAD1
.
iloc
[
-
1
]
This diff is collapsed.
Click to expand it.
src/test_plotter.py
+
1
−
1
View file @
e2f46cce
...
...
@@ -9,7 +9,7 @@ this_file_dir = Path(__file__).parent
def
test_load_plotter
():
"""
Tests that the Plotter class can be loaded.
"""
dataset
=
Dataset
(
this_file_dir
/
"
../data/GamingStudy_data.csv
"
)
dataset
=
Dataset
(
str
(
this_file_dir
/
"
../data/GamingStudy_data.csv
"
)
)
plotter
=
Plotter
(
dataset
)
assert
type
(
plotter
.
df
)
==
pd
.
DataFrame
assert
type
(
plotter
.
ds
)
==
Dataset
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment