From fa3840e0b43c46973631d0b47abddd4539011d52 Mon Sep 17 00:00:00 2001 From: John Beard Date: Sat, 2 Jun 2018 18:03:04 +0100 Subject: [PATCH] Add stub for testing with setup.py test --- .gitignore | 3 +++ setup.cfg | 2 ++ setup.py | 2 ++ tests/test_yaml.py | 8 ++++++++ 4 files changed, 15 insertions(+) create mode 100644 setup.cfg create mode 100644 tests/test_yaml.py diff --git a/.gitignore b/.gitignore index 5b39d7cc..58d36d85 100644 --- a/.gitignore +++ b/.gitignore @@ -24,3 +24,6 @@ wheels/ .installed.cfg *.egg MANIFEST + + +.pytest_cache \ No newline at end of file diff --git a/setup.cfg b/setup.cfg new file mode 100644 index 00000000..9af7e6f1 --- /dev/null +++ b/setup.cfg @@ -0,0 +1,2 @@ +[aliases] +test=pytest \ No newline at end of file diff --git a/setup.py b/setup.py index b35433d9..a4200c95 100644 --- a/setup.py +++ b/setup.py @@ -66,4 +66,6 @@ setup( 'Programming Language :: Python :: Implementation :: PyPy', 'Topic :: Scientific/Engineering :: Electronic Design Automation (EDA)', ], + setup_requires=['pytest-runner'], + tests_require=['pytest'], ) diff --git a/tests/test_yaml.py b/tests/test_yaml.py new file mode 100644 index 00000000..4082f0ee --- /dev/null +++ b/tests/test_yaml.py @@ -0,0 +1,8 @@ +""" +Tests for the YAML parser +""" + + +# content of test_sample.py +def test_numbers_3_4(): + assert 12 == 12