From f3e1c875dee1cf030247de45294d685306131fdb Mon Sep 17 00:00:00 2001 From: LSaldyt Date: Mon, 9 Oct 2017 13:01:18 -0600 Subject: [PATCH] Adds travis testing skeleton --- .travis.yml | 5 +++++ tests.py | 3 +++ 2 files changed, 8 insertions(+) create mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..5bb996d --- /dev/null +++ b/.travis.yml @@ -0,0 +1,5 @@ +language: python +python: + - "3.6" +script: + - python3 tests.py diff --git a/tests.py b/tests.py index c607867..eccbafd 100644 --- a/tests.py +++ b/tests.py @@ -1,4 +1,6 @@ import unittest +from pprint import pprint + from copycat import Copycat # TODO: update test cases to use entropy @@ -67,6 +69,7 @@ class TestCopycat(unittest.TestCase): self.fail('No instances of expected key %s were produced! %r != %r' % (k, actual, expected)) def run_testcase(self, initial, modified, target, iterations, expected): + pprint(expected) actual = Copycat().run(initial, modified, target, iterations) self.assertEqual(sum(a['count'] for a in list(actual.values())), iterations) self.assertProbabilitiesLookRoughlyLike(actual, expected)