test: make file for funcs which tests the functionality

This commit is contained in:
Skudalen 2021-06-22 21:30:55 +02:00
parent 0fd756be6f
commit 5e5d07a150
3 changed files with 12 additions and 1 deletions

View File

@ -9,7 +9,7 @@ class CSV_handler:
self.working_dir = str(Path.cwd()) self.working_dir = str(Path.cwd())
# Makes dataframe from the csv files in the working directory # Makes dataframe from the csv files in the working directory
def make_df(self, filename) def make_df(self, filename):
filepath = self.working_dir + str(filename) filepath = self.working_dir + str(filename)
df = pd.read_csv(filepath) df = pd.read_csv(filepath)
return df return df

BIN
Handle_emg_data.pyc Normal file

Binary file not shown.

11
Test_functions.py Normal file
View File

@ -0,0 +1,11 @@
from Handle_emg_data.py import CSV_handler
def test_df_extraction():
handler = CSV_handler()
filename = "Exp20201205_2myo_hardTypePP/HaluskaMarek_20201207_1810/myoLeftEmg.csv"
subject1_left_emg1 = handler.get_time_emg_table(filename, 1)
print(subject1_left_emg1.head())
test_df_extraction()