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

Replace tests with pytest runner #244

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from
Open
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
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,10 @@ venv
# IDEs
.vscode
.idea

# Test coverage
.coverage

# Cache
.pytest_cache
.mypy_cache
19 changes: 9 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@ def calc_pi_device(samples):
return 4 * af.count(within_unit_circle) / samples
```


Choosing a particular backend can be done using `af.set_backend(name)` where name is either "_cuda_", "_opencl_", or "_cpu_". The default device is chosen in the same order of preference.
Choosing a particular backend can be done using `af.set_backend(name)` where name is either "_cuda_", "_opencl_", or "_cpu_". The default device is chosen in the same order of preference.

## Requirements

Expand All @@ -41,19 +40,19 @@ Please check the following links for dependencies.

**Install the last stable version:**

```
```bash
pip install arrayfire
```

**Install the development version:**

```
```bash
pip install git+git://github.com/arrayfire/arrayfire-python.git@devel
```

**Installing offline:**

```
```bash
cd path/to/arrayfire-python
python setup.py install
```
Expand All @@ -62,16 +61,16 @@ python setup.py install

Please follow [these instructions](https://github.com/arrayfire/arrayfire-python/wiki) to ensure the arrayfire-python can find the arrayfire libraries.

To run arrayfire tests, you can run the following command from command line.
To run arrayfire smoke tests, you can run the following command from command line.

```
python -m arrayfire.tests
```bash
python setup.py test
```

## Communication

* [Slack Chat](https://join.slack.com/t/arrayfire-org/shared_invite/MjI4MjIzMDMzMTczLTE1MDI5ODg4NzYtN2QwNGE3ODA5OQ)
* [Google Groups](https://groups.google.com/forum/#!forum/arrayfire-users)
- [Slack Chat](https://join.slack.com/t/arrayfire-org/shared_invite/MjI4MjIzMDMzMTczLTE1MDI5ODg4NzYtN2QwNGE3ODA5OQ)
- [Google Groups](https://groups.google.com/forum/#!forum/arrayfire-users)

## Acknowledgements

Expand Down
20 changes: 19 additions & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,32 @@ classifiers =
[options]
packages = find:
python_requires = >=3.6.0
setup_requires =
pytest-runner
tests_require =
flake8-import-order
flake8-quotes
pytest-cov
pytest-flake8
pytest-mypy

[options.packages.find]
include = arrayfire
exclude =
examples
tests

[aliases]
test = pytest

[flake8]
application-import-names = arrayfire
import-order-style = pep8
max-line-length = 119

[tool:pytest]
addopts = --cache-clear --cov=arrayfire --cov-fail-under=70
console_output_style = classic

[coverage:report]
show_missing = true
skip_covered = true
10 changes: 0 additions & 10 deletions tests/__init__.py
Original file line number Diff line number Diff line change
@@ -1,10 +0,0 @@
#!/usr/bin/env python

#######################################################
# Copyright (c) 2019, ArrayFire
# All rights reserved.
#
# This file is distributed under 3-clause BSD license.
# The complete license agreement can be obtained at:
# http://arrayfire.com/licenses/BSD-3-Clause
########################################################
51 changes: 0 additions & 51 deletions tests/__main__.py

This file was deleted.

44 changes: 0 additions & 44 deletions tests/simple/__init__.py

This file was deleted.

62 changes: 0 additions & 62 deletions tests/simple/_util.py

This file was deleted.

120 changes: 0 additions & 120 deletions tests/simple/algorithm.py

This file was deleted.

Loading