Skip to content
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
3 changes: 0 additions & 3 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,3 @@
# The git executable expects packed-refs to always have LF line endings, even on
# Windows.
**/packed-refs text eol=lf

# We don't want CRLF conversion or any automatic change in there
tests/python/third_party/** binary
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ pip-log.txt
coverage.xml
coverage_html_report
htmlcov
tests/python/third_party

#Translations
*.mo
Expand Down
40 changes: 9 additions & 31 deletions tests/README.md
Original file line number Diff line number Diff line change
@@ -1,47 +1,25 @@
Readme for Tank core tests
==========================

Required packages
-----------------
To install the required dependencies, just run the following command on the `python` directory.

```shell
cd python
./upgrade_third_party.sh
```

Packages will be installed under `tests/python/third_party`

Running the test suite
-----------------------
To run the tests on Windows run the `run_tests.bat`. Also you need to run it as `admin` in `powershell`
with unrestricted execution policy (`Set-ExecutionPolicy Unrestricted`).

To run on Linux or macOS, run the script `run_tests.sh`.

Add `-h` to see options.
Add `--with-coverage` to enable coverage.

To run specific test(s), specify module, or module.class or module.class.test:
The tests run with [pytest](https://docs.pytest.org/) through
[tk-toolchain](https://github.com/shotgunsoftware/tk-toolchain). Install
`tk-toolchain` and run `pytest` from the repository root:

```shell
run_tests.sh test_tank_content.TestValidate.test_valid_path
pip install git+https://github.com/shotgunsoftware/tk-toolchain.git
pytest
```

To run all the tests from a specific file, you can specify both the module or file path:

```shell
./run_tests.sh tank_module_test.test_module
```
To run a specific test file, class, or test:

```shell
./run_tests.sh tank_module_test/test_module.py
pytest tests/core_tests/test_api.py
pytest tests/core_tests/test_api.py::TestApi::test_something
```

Compile sources with Python 3
-----------------------------
To make sure the tank source code can be compiled with Python 3, run the `compile_python3.*` scripts. Note that the unit tests cannot
be executed right now with Python 3.
Add `--cov` to enable coverage.

Test suite layout
-----------------
Expand Down
19 changes: 0 additions & 19 deletions tests/compile_python3.bat

This file was deleted.

18 changes: 0 additions & 18 deletions tests/compile_python3.sh

This file was deleted.

1 change: 0 additions & 1 deletion tests/integration_tests/run_integration_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ def main():
environ["PYTHONPATH"] = os.path.pathsep.join(
[
os.path.join(current_folder, "..", "python"),
os.path.join(current_folder, "..", "python", "third_party"),
os.path.join(current_folder, "..", "..", "python"),
]
)
Expand Down
15 changes: 0 additions & 15 deletions tests/python/README.md

This file was deleted.

21 changes: 0 additions & 21 deletions tests/python/requirements.txt

This file was deleted.

64 changes: 0 additions & 64 deletions tests/python/upgrade_third_party.sh

This file was deleted.

18 changes: 0 additions & 18 deletions tests/run_tests.bat

This file was deleted.

Loading