From fc9bff7bc5f4f7c6d56c6ddb202e5f48600eb73d Mon Sep 17 00:00:00 2001 From: Thomas Waldmann Date: Sat, 28 Sep 2013 11:27:22 +0200 Subject: [PATCH 1/2] create _tests subdir, py.test based example test module --- nsupdate/main/_tests/test_example.py | 11 +++++++++++ nsupdate/main/tests.py | 16 ---------------- 2 files changed, 11 insertions(+), 16 deletions(-) create mode 100644 nsupdate/main/_tests/test_example.py delete mode 100644 nsupdate/main/tests.py diff --git a/nsupdate/main/_tests/test_example.py b/nsupdate/main/_tests/test_example.py new file mode 100644 index 0000000..e7d3d1a --- /dev/null +++ b/nsupdate/main/_tests/test_example.py @@ -0,0 +1,11 @@ +""" +Tests for xxx module. +""" + + +class Tests(object): + def test_basic_addition(self): + """ + Tests that 1 + 1 always equals 2. + """ + assert 1 + 1 == 2 diff --git a/nsupdate/main/tests.py b/nsupdate/main/tests.py deleted file mode 100644 index 501deb7..0000000 --- a/nsupdate/main/tests.py +++ /dev/null @@ -1,16 +0,0 @@ -""" -This file demonstrates writing tests using the unittest module. These will pass -when you run "manage.py test". - -Replace this with more appropriate tests for your application. -""" - -from django.test import TestCase - - -class SimpleTest(TestCase): - def test_basic_addition(self): - """ - Tests that 1 + 1 always equals 2. - """ - self.assertEqual(1 + 1, 2) From 5af4afca4b36931e8e2186fff1f6c800e1e87d00 Mon Sep 17 00:00:00 2001 From: Thomas Waldmann Date: Sat, 28 Sep 2013 11:28:46 +0200 Subject: [PATCH 2/2] git: ignore py.test .cache dir --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index bcb1bb7..9e80fa0 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,5 @@ *.pyc local_settings.py .idea/ +.cache/ +