aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorAdam Spiers <git@adamspiers.org>2018-05-15 16:04:07 +0100
committerAdam Spiers <git@adamspiers.org>2018-05-15 16:04:07 +0100
commit4c4d8ac7e1da49655583dd124db6d4cf359863a5 (patch)
tree24ca399dee60bba7299a4cbcc3c4af896a44ba37 /tests
parent5846751805d5c73acded79dc4e2ed37bdcf3280e (diff)
downloadgit-deps-4c4d8ac7e1da49655583dd124db6d4cf359863a5.tar.gz
remove broken scaffold test and add a working one
Diffstat (limited to 'tests')
-rw-r--r--tests/test_GitUtils.py14
-rw-r--r--tests/test_skeleton.py17
2 files changed, 14 insertions, 17 deletions
diff --git a/tests/test_GitUtils.py b/tests/test_GitUtils.py
new file mode 100644
index 0000000..c5f79ca
--- /dev/null
+++ b/tests/test_GitUtils.py
@@ -0,0 +1,14 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+
+import pytest
+from git_deps.gitutils import GitUtils
+
+__author__ = "Adam Spiers"
+__copyright__ = "Adam Spiers"
+__license__ = "none"
+
+
+def test_abbreviate_sha1():
+ sha1 = GitUtils.abbreviate_sha1("HEAD")
+ assert len(sha1) == 7
diff --git a/tests/test_skeleton.py b/tests/test_skeleton.py
deleted file mode 100644
index ec2ef23..0000000
--- a/tests/test_skeleton.py
+++ /dev/null
@@ -1,17 +0,0 @@
-#!/usr/bin/env python
-# -*- coding: utf-8 -*-
-
-import pytest
-from git_deps.skeleton import fib
-
-__author__ = "Adam Spiers"
-__copyright__ = "Adam Spiers"
-__license__ = "none"
-
-
-def test_fib():
- assert fib(1) == 1
- assert fib(2) == 1
- assert fib(7) == 13
- with pytest.raises(AssertionError):
- fib(-10)