Skip to content

Commit

Permalink
Refacter tests
Browse files Browse the repository at this point in the history
  • Loading branch information
clach04 committed Dec 9, 2023
1 parent 410c8a5 commit 8b6240c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions puren_tonbo/tests/testsuite.py
Original file line number Diff line number Diff line change
Expand Up @@ -530,7 +530,7 @@ def tearDownClass(self):
shutil.rmtree(self.data_folder)

# TODO new test without password
def do_one_test(self, in_filename, buffer_plain_str, dos_newlines=None, test_password_bytes=None):
def do_one_test_simple(self, in_filename, buffer_plain_str, dos_newlines=None, test_password_bytes=None):
filename_no_path = in_filename
in_filename = os.path.join(self.data_folder, in_filename)
try:
Expand Down Expand Up @@ -574,7 +574,7 @@ def test_file_one_with_dos_newlines(self):
file one.
'''
self.do_one_test(in_filename, buffer_plain_str, dos_newlines=dos_newlines, test_password_bytes=self.test_password_bytes)
self.do_one_test_simple(in_filename, buffer_plain_str, dos_newlines=dos_newlines, test_password_bytes=self.test_password_bytes)

def test_file_one_without_dos_newlines(self):
in_filename = 'one.txt'
Expand All @@ -584,7 +584,7 @@ def test_file_one_without_dos_newlines(self):
file one.
'''
self.do_one_test(in_filename, buffer_plain_str, dos_newlines=dos_newlines, test_password_bytes=self.test_password_bytes)
self.do_one_test_simple(in_filename, buffer_plain_str, dos_newlines=dos_newlines, test_password_bytes=self.test_password_bytes)

def test_file_one_with_default_dos_newlines(self):
in_filename = 'one.txt'
Expand All @@ -594,7 +594,7 @@ def test_file_one_with_default_dos_newlines(self):
file one.
'''
self.do_one_test(in_filename, buffer_plain_str, dos_newlines=dos_newlines, test_password_bytes=self.test_password_bytes)
self.do_one_test_simple(in_filename, buffer_plain_str, dos_newlines=dos_newlines, test_password_bytes=self.test_password_bytes)

# TODO test write file, then save/edit once - confirm have backup and new file
# TODO test write file auto generate name
Expand Down

0 comments on commit 8b6240c

Please sign in to comment.