diff options
author | w0rp <devw0rp@gmail.com> | 2023-09-08 01:00:35 +0100 |
---|---|---|
committer | w0rp <devw0rp@gmail.com> | 2023-09-08 01:00:35 +0100 |
commit | bf55175b6971a9a706dfb73ddd00b71750aaee80 (patch) | |
tree | 906224bf3752461d25a891dfd0c8261efd4a1480 /test/test_code_action_python.vader | |
parent | e5816964d1ce27c1dcf3497ba80beccd99bc8fd6 (diff) | |
download | ale-bf55175b6971a9a706dfb73ddd00b71750aaee80.zip |
#4454 Clean up root test directory tests
Combine cases into smaller tests of tests and remove tests we no longer
need. Linter tests have been moved to where they should be.
Diffstat (limited to 'test/test_code_action_python.vader')
-rw-r--r-- | test/test_code_action_python.vader | 59 |
1 files changed, 0 insertions, 59 deletions
diff --git a/test/test_code_action_python.vader b/test/test_code_action_python.vader deleted file mode 100644 index 3c784816..00000000 --- a/test/test_code_action_python.vader +++ /dev/null @@ -1,59 +0,0 @@ -Given python(An example Python file): - def main(): - a = 1 - c = a + 1 - -Execute(): - let g:changes = [ - \ {'end': {'offset': 7, 'line': 1}, 'newText': 'func_qtffgsv', 'start': {'offset': 5, 'line': 1}}, - \ {'end': {'offset': 9, 'line': 1}, 'newText': '', 'start': {'offset': 8, 'line': 1}}, - \ {'end': {'offset': 15, 'line': 3}, 'newText': " return c\n\n\ndef main():\n c = func_qtffgsvi()\n", 'start': {'offset': 15, 'line': 3}} - \] - - call ale#code_action#ApplyChanges(expand('%:p'), g:changes, {}) - -Expect(The changes should be applied correctly): - def func_qtffgsvi(): - a = 1 - c = a + 1 - return c - - - def main(): - c = func_qtffgsvi() - - -Given python(Second python example): - import sys - import exifread - - def main(): - with open(sys.argv[1], 'rb') as f: - exif = exifread.process_file(f) - dt = str(exif['Image DateTime']) - date = dt[:10].replace(':', '-') - -Execute(): - let g:changes = [ - \ {'end': {'offset': 16, 'line': 2}, 'newText': "\n\n\ndef func_ivlpdpao(f):\n exif = exifread.process_file(f)\n dt = str(exif['Image DateTime'])\n date = dt[:10].replace(':', '-')\n return date\n", 'start': {'offset': 16, 'line': 2}}, - \ {'end': {'offset': 32, 'line': 6}, 'newText': 'date = func', 'start': {'offset': 9, 'line': 6}}, - \ {'end': {'offset': 42, 'line': 8}, 'newText': "ivlpdpao(f)\n", 'start': {'offset': 33, 'line': 6}} - \] - - call ale#code_action#ApplyChanges(expand('%:p'), g:changes, {}) - -Expect(The changes should be applied correctly): - import sys - import exifread - - - def func_ivlpdpao(f): - exif = exifread.process_file(f) - dt = str(exif['Image DateTime']) - date = dt[:10].replace(':', '-') - return date - - - def main(): - with open(sys.argv[1], 'rb') as f: - date = func_ivlpdpao(f) |