Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor for testing and introduce pytest workflow #96

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Run tests

on: [pull_request]

jobs:
tests:
name: "Python ${{ matrix.python-version }}"
runs-on: "ubuntu-latest"
strategy:
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10"]

steps:
- uses: actions/checkout@v1
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install package
run: pip install .
- name: Install test requirements
run: pip install -r test-requirements.txt
- name: Run tests
run: pytest
23 changes: 9 additions & 14 deletions ftplugin/python_ropevim.vim
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,16 @@ endif
function! LoadRope()
PythonCmd << EOF
import ropevim
from rope_omni import RopeOmniCompleter

if not hasattr(ropevim, "__version__") or ropevim.__version__ != "0.9.0":
print(
"Mismatching version for pip installed ropevim,"
" please run 'pip install --upgrade ropevim' and make sure"
" the version of the ropevim vim plugin is up to date"
)
else:
ropevim.load_ropevim()
EOF
endfunction

call LoadRope()

" The code below is an omni-completer for python using rope and ropevim.
" Created by Ryan Wooden (rygwdn@gmail.com)

function! RopeCompleteFunc(findstart, base)
" A completefunc for python code using rope
if (a:findstart)
PythonCmd ropecompleter = RopeOmniCompleter(vim.eval("a:base"))
PythonCmd vim.command("return %s" % ropecompleter.start)
else
PythonCmd vim.command("return %s" % ropecompleter.complete(vim.eval("a:base")))
endif
endfunction
56 changes: 0 additions & 56 deletions rope_omni.py

This file was deleted.

Loading