From e15fb80060ff6e18650cd3ebc8f403167b714898 Mon Sep 17 00:00:00 2001 From: x10an14 Date: Wed, 17 May 2017 13:42:18 +0200 Subject: [PATCH 1/3] Feature: Updated TESTING instructions. Future TODO: Make .py test-files executable without polluting machine environment. (AKA: Through a virtualenv permit `import toml` without raising `ImportError`). --- TESTING | 1 - TESTING.md | 18 ++++++++++++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) delete mode 100644 TESTING create mode 100644 TESTING.md diff --git a/TESTING b/TESTING deleted file mode 100644 index 0821bc9..0000000 --- a/TESTING +++ /dev/null @@ -1 +0,0 @@ -There is a toml_test.py script which acts as a harness in order to allow toml to be used with [BurntSushi's toml test suite](https://github.com/BurntSushi/toml-test), written in Go. Usage means installing go, the toml-test suite and running the toml-test go binary with toml_test.py as its argument. Modification of tests should happen in BurntSushi's repository. For testing python3 (rather than python2), the toml_test3.py script should be used instead. diff --git a/TESTING.md b/TESTING.md new file mode 100644 index 0000000..29834b5 --- /dev/null +++ b/TESTING.md @@ -0,0 +1,18 @@ +# Testing +There is a `toml_test.py` script which acts as a harness in order to allow toml to be used with [BurntSushi's toml test suite](https://github.com/BurntSushi/toml-test), written in Go. + +## Usage +1. Install Go (golang) +2. The toml-test suite + 1. [Instructions](https://github.com/BurntSushi/toml-test#try-it-out) +3. Execute with either of: + * `~/go/bin/toml-test ./tests/decoding_test.sh` - Default (PATH) Python version + * `~/go/bin/toml-test ./tests/decoding_test2.sh` - Python 2 + * `~/go/bin/toml-test ./tests/decoding_test3.sh` - Python 3 + +## Addendum +There's also two Python test-files in the `./tests` directory +* `example_test.py`, +* and `decoding_test.py`. + +Both of which require the `toml` library to be importable (aka `import toml` to work). From c2857b6f40f1ea46e2e1c4deafd1939571f13d4d Mon Sep 17 00:00:00 2001 From: x10an14 Date: Wed, 17 May 2017 15:08:49 +0200 Subject: [PATCH 2/3] Enhancement/Bugfix: Specify which files require Python 3. --- TESTING.md | 1 + 1 file changed, 1 insertion(+) diff --git a/TESTING.md b/TESTING.md index 29834b5..f9a68bb 100644 --- a/TESTING.md +++ b/TESTING.md @@ -16,3 +16,4 @@ There's also two Python test-files in the `./tests` directory * and `decoding_test.py`. Both of which require the `toml` library to be importable (aka `import toml` to work). +Both also require Python 3 (due to using `print()`). From 5b801b45d4fa1edf1b1146b0d2cdbf8e023f0180 Mon Sep 17 00:00:00 2001 From: Uiri Date: Wed, 7 Jun 2017 22:47:21 -0400 Subject: [PATCH 3/3] Clean up TESTING.md and rename to CONTRIBUTING --- CONTRIBUTING | 15 +++++++++++++++ TESTING.md | 19 ------------------- tests/example_test.py | 12 ------------ 3 files changed, 15 insertions(+), 31 deletions(-) create mode 100644 CONTRIBUTING delete mode 100644 TESTING.md delete mode 100755 tests/example_test.py diff --git a/CONTRIBUTING b/CONTRIBUTING new file mode 100644 index 0000000..0c718cd --- /dev/null +++ b/CONTRIBUTING @@ -0,0 +1,15 @@ +Issues and Pull Requests are always welcome. Thank you for your contribution! + +# Reporting an Issue +Please check the latest development version to see if your issue has been fixed since the latest stable release. + +# Test Suite +There is a `decoding_test.py` script in the `tests/` directory which acts as a harness in order to allow toml to be used with [the toml test suite](https://github.com/uiri/toml-test), written (unfortunately) in Go. + +## Usage +1. Install Go (golang) +2. The toml-test suite + 1. [Instructions](https://github.com/BurntSushi/toml-test#try-it-out) +3. Test both versions of Python: + * `~/go/bin/toml-test ./tests/decoding_test2.sh` - for Python 2 + * `~/go/bin/toml-test ./tests/decoding_test3.sh` - for Python 3 diff --git a/TESTING.md b/TESTING.md deleted file mode 100644 index f9a68bb..0000000 --- a/TESTING.md +++ /dev/null @@ -1,19 +0,0 @@ -# Testing -There is a `toml_test.py` script which acts as a harness in order to allow toml to be used with [BurntSushi's toml test suite](https://github.com/BurntSushi/toml-test), written in Go. - -## Usage -1. Install Go (golang) -2. The toml-test suite - 1. [Instructions](https://github.com/BurntSushi/toml-test#try-it-out) -3. Execute with either of: - * `~/go/bin/toml-test ./tests/decoding_test.sh` - Default (PATH) Python version - * `~/go/bin/toml-test ./tests/decoding_test2.sh` - Python 2 - * `~/go/bin/toml-test ./tests/decoding_test3.sh` - Python 3 - -## Addendum -There's also two Python test-files in the `./tests` directory -* `example_test.py`, -* and `decoding_test.py`. - -Both of which require the `toml` library to be importable (aka `import toml` to work). -Both also require Python 3 (due to using `print()`). diff --git a/tests/example_test.py b/tests/example_test.py deleted file mode 100755 index b2d87a3..0000000 --- a/tests/example_test.py +++ /dev/null @@ -1,12 +0,0 @@ -#!/usr/bin/env python -"""Decodes toml and outputs it as JSON""" - -import toml_test -import toml -import sys -import json - -if __name__ == '__main__': - tdata = toml.loads(sys.stdin.detach().read().decode('utf-8')) - tagged = toml_test.tag(tdata) - print(json.dumps(tagged))