Skip to content

Commit

Permalink
refactors skip condition when there is no setup.py and udpates ci f…
Browse files Browse the repository at this point in the history
…or remote unit tests (#69)
  • Loading branch information
mxochicale committed Jul 27, 2023
1 parent 6dcfd44 commit 5c4399d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,4 @@ jobs:
- name: Run tests
run: |
python -m pytest -v -s ./tests/
python -m pytest -v -s -rs tests/
3 changes: 1 addition & 2 deletions tests/test_template.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
def test_template_tests():
temp_folder = tempfile.mkdtemp()
cookiecutter('.', output_dir=temp_folder, no_input=True, overwrite_if_exists=True)
return_code = subprocess.call([sys.executable, '-m', 'pytest'], cwd=os.path.join(temp_folder, 'MyNewProject'))
print(return_code)
return_code = subprocess.call([sys.executable, '-m', 'pytest', '-v'], cwd=os.path.join(temp_folder, 'MyNewProject'))
shutil.rmtree(temp_folder)
assert not return_code
3 changes: 2 additions & 1 deletion {{cookiecutter.project_slug}}/tests/test_requirements.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@
specify the same dependencies
"""
import pytest
import glob

@pytest.mark.skip(reason="temporally skipping this for the migration to pyproject.toml")
@pytest.mark.skipif(not glob.glob('setup.py')=='setup.py', reason="there is no setup.py")
def test_requirements_vs_setup():
"""
Test that the requirements.txt matches setup.py
Expand Down

0 comments on commit 5c4399d

Please sign in to comment.