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

Allow the tests to run even from an installation. #35

Merged
merged 5 commits into from
Jun 29, 2024
Merged
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
4 changes: 2 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
python-version: [3.7, 3.8]
python-version: [3.8, 3.12]

runs-on: ${{ matrix.os }}

Expand All @@ -21,7 +21,7 @@ jobs:
run: |
python -m pip install --upgrade pip
python -m pip install pytest coverage
python setup.py develop
python -m pip install -v .
- name: Run tests
run: |
coverage erase
Expand Down
2 changes: 1 addition & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
include MANIFEST.in *.py *.rst *.txt *.yml
include MANIFEST.in *.py *.rst *.txt *.yml *.toml
recursive-include docs *.*
recursive-include examples *.py *.yml *.txt *.md
recursive-exclude examples/tutorial/.automan *.*
Expand Down
5 changes: 5 additions & 0 deletions automan/tests/test_cluster_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,11 @@ def test_cli(self, mock_update, mock_add_worker):
sys.platform.startswith('win'),
'Test requires Python 3.x and a non-Windows system.')
def test_remote_bootstrap_and_sync(self):
if not os.path.exists('setup.py'):
raise unittest.SkipTest(
'This test requires to be run from the automan source directory.'
)

# Given
cm = MyClusterManager(exclude_paths=['outputs/'], testing=True)
cm.BOOTSTRAP = cm.BOOTSTRAP.replace('ROOT', self.cwd)
Expand Down
5 changes: 5 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[build-system]
requires = [
"wheel>=0.29.0",
"setuptools>=42.0.0"
]
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ def get_version():
return data.get('__version__')


install_requires = ['psutil', 'execnet']
install_requires = ['psutil', 'execnet', 'setuptools']
tests_require = ['pytest']
if sys.version_info.major < 3:
tests_require.append('mock')
Expand Down
Loading