From 4e3346c1531e18a2f921243e5a0dd95fcfba5267 Mon Sep 17 00:00:00 2001
From: Greg Albrecht <gba@gregalbrecht.com>
Date: Sat, 19 Jan 2013 18:00:55 -0800
Subject: [PATCH] updating coverage.

---
 .gitignore         | 1 +
 Makefile           | 2 +-
 setup.cfg          | 9 +++++++++
 setup.py           | 2 +-
 tests/test_aprs.py | 5 +++--
 5 files changed, 15 insertions(+), 4 deletions(-)
 create mode 100644 setup.cfg

diff --git a/.gitignore b/.gitignore
index 7d9be15..d2999d5 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,5 +1,6 @@
 *.py[co]
 *.egg-info/
+*.egg
 cover/
 .coverage
 output.xml
diff --git a/Makefile b/Makefile
index dd37a92..8897b6d 100644
--- a/Makefile
+++ b/Makefile
@@ -34,7 +34,7 @@ flake8:
 		awk -F\: '{printf "%s:%s: [E]%s\n", $$1, $$2, $$3}' | tee flake8.log
 
 clonedigger:
-	clonedigger --cpd-output .
+	clonedigger --cpd-output aprs tests
 
 lint:
 	pylint -f parseable -i y -r y aprs/*.py tests/*.py *.py | \
diff --git a/setup.cfg b/setup.cfg
new file mode 100644
index 0000000..fe220ee
--- /dev/null
+++ b/setup.cfg
@@ -0,0 +1,9 @@
+[nosetests]
+with-xunit = 1
+with-coverage = 1
+cover-html = 1
+with-doctest = 1
+doctest-tests = 1
+cover-inclusive = 1
+cover-package = aprs
+cover-tests = 1
diff --git a/setup.py b/setup.py
index 1961784..1bb19bd 100644
--- a/setup.py
+++ b/setup.py
@@ -17,7 +17,7 @@ setuptools.setup(
     license='Creative Commons Attribution 3.0 Unported License',
     url='https://github.com/ampledata/aprs',
     setup_requires=['nose'],
-    tests_require=['nose', 'httpretty'],
+    tests_require=['coverage', 'httpretty', 'nose'],
     install_requires=['requests']
 
 )
diff --git a/tests/test_aprs.py b/tests/test_aprs.py
index 181dcc6..a569173 100644
--- a/tests/test_aprs.py
+++ b/tests/test_aprs.py
@@ -13,6 +13,7 @@ from .context import aprs
 
 ALPHABET = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
 NUMBERS = '0123456789'
+POSITIVE_NUMBERS = NUMBERS[1:]
 ALPHANUM = ''.join([ALPHABET, NUMBERS])
 
 
@@ -28,7 +29,7 @@ class APRSTest(unittest.TestCase):
     def setUp(self):
         self.fake_server = ''.join([
             'http://localhost:',
-            self.random(4, '123456789'),
+            self.random(4, POSITIVE_NUMBERS),
             '/'
         ])
 
@@ -37,7 +38,7 @@ class APRSTest(unittest.TestCase):
             self.random(1, NUMBERS),
             self.random(3, ALPHABET),
             '-',
-            self.random(1, '123456789')
+            self.random(1, POSITIVE_NUMBERS)
         ])
 
         self.real_server = 'http://localhost:14580'
-- 
GitLab