Conditions | 2 |
Total Lines | 13 |
Code Lines | 12 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | import os |
||
10 | def test_file_statistics(self): |
||
11 | parent_folder = os.path.abspath(os.pardir) + '/' + '/'.join([ |
||
12 | 'virtual_environment', |
||
13 | 'Scripts' |
||
14 | ]) |
||
15 | relevant_file = 'pip' |
||
16 | if platform.system() == 'Windows': |
||
17 | relevant_file += '.exe' |
||
18 | file_to_evaluate = os.path.join(parent_folder, relevant_file) |
||
19 | fo = FileOperations() |
||
20 | value_to_assert = fo.fn_get_file_statistics(file_to_evaluate)['size [bytes]'] |
||
21 | value_to_compare_with = os.path.getsize(file_to_evaluate) |
||
22 | self.assertEqual(value_to_assert, value_to_compare_with) |
||
23 |