Merge ~barryprice/spade/+git/spade:tests into spade:master

Proposed by Barry Price
Status: Work in progress
Proposed branch: ~barryprice/spade/+git/spade:tests
Merge into: spade:master
Prerequisite: ~barryprice/spade/+git/spade:snapcraft
Diff against target: 57 lines (+25/-1)
5 files modified
.gitignore (+4/-0)
Makefile (+6/-1)
requirements.txt (+0/-0)
tests/unit/requirements.txt (+3/-0)
tests/unit/test_spade.py (+12/-0)
Reviewer Review Type Date Requested Status
Spade Developers Pending
Review via email: mp+394605@code.launchpad.net

Commit message

Initial test suite setup, dummy first test, not ready at all

To post a comment you must log in.

Unmerged commits

b7483f5... by Barry Price

Initial test suite setup, dummy first test, not ready at all

ef1426b... by Barry Price

Merge branch 'black' into snapcraft

fae038f... by Barry Price

Snapcraft fixes, and ignore built snap files

1734965... by Barry Price

Merge branch 'flake8' into black

6817bc5... by Barry Price

Merge branch 'master' into flake8

c85283a... by Barry Price

Typo

a86afa5... by Barry Price

Reformatted with black

aa2d273... by Barry Price

Address all Flake8 errors bar complexity (noqa: C901)

7e34f18... by Barry Price

Modernise, switch to python3 exclusively

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/.gitignore b/.gitignore
2index 9d17685..a71dd9c 100644
3--- a/.gitignore
4+++ b/.gitignore
5@@ -1 +1,5 @@
6 spade_*.snap
7+.coverage
8+spade.json
9+spade/__pycache__/
10+tests/unit/__pycache__/
11diff --git a/Makefile b/Makefile
12index 0efca2a..2ae4507 100644
13--- a/Makefile
14+++ b/Makefile
15@@ -19,4 +19,9 @@ snap: snap_clean
16 snap_clean:
17 rm -Rf $(tempfiles_snap)
18
19-.PHONY: blacken lint clean snap snap_clean
20+unittest:
21+ @tox -e unit
22+
23+test: lint unittest
24+
25+.PHONY: blacken lint clean snap snap_clean unittest test
26diff --git a/requirements.txt b/requirements.txt
27new file mode 100644
28index 0000000..e69de29
29--- /dev/null
30+++ b/requirements.txt
31diff --git a/tests/unit/requirements.txt b/tests/unit/requirements.txt
32new file mode 100644
33index 0000000..27054f2
34--- /dev/null
35+++ b/tests/unit/requirements.txt
36@@ -0,0 +1,3 @@
37+mock
38+pytest
39+pytest-cov
40diff --git a/tests/unit/test_spade.py b/tests/unit/test_spade.py
41new file mode 100644
42index 0000000..316efe4
43--- /dev/null
44+++ b/tests/unit/test_spade.py
45@@ -0,0 +1,12 @@
46+import os
47+import sys
48+from unittest import mock, TestCase
49+
50+sys.path.insert(0, os.path.join(os.path.dirname(os.path.dirname(__file__)), ".."))
51+
52+import spade
53+
54+class SpadeTest(TestCase):
55+
56+ def test_spade(self):
57+ self.assertEqual(2, 2)

Subscribers

People subscribed via source and target branches

to all changes: