curds: Clean up unused code
I added a make target for code coverage, and used that to identify code that isn't getting run. Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
This commit is contained in:
parent
1eac742bc4
commit
f56e6764a8
6
Makefile
6
Makefile
|
@ -9,3 +9,9 @@ clean:
|
||||||
trier:
|
trier:
|
||||||
python trier/generate_tracks.py
|
python trier/generate_tracks.py
|
||||||
EMMENTAL_TESTING=1 python -m unittest discover -v curds/
|
EMMENTAL_TESTING=1 python -m unittest discover -v curds/
|
||||||
|
|
||||||
|
.PHONY:cover
|
||||||
|
cover:
|
||||||
|
python trier/generate_tracks.py
|
||||||
|
EMMENTAL_TESTING=1 coverage run -m unittest discover -v curds/
|
||||||
|
coverage report -m
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
# Copyright 2019 (c) Anna Schumaker
|
# Copyright 2019 (c) Anna Schumaker
|
||||||
import asyncio
|
|
||||||
import concurrent.futures
|
import concurrent.futures
|
||||||
import hashlib
|
import hashlib
|
||||||
import unittest
|
import unittest
|
||||||
|
@ -64,7 +63,3 @@ class TestAlbumClass(unittest.TestCase):
|
||||||
self.assertIsNotNone(res[0])
|
self.assertIsNotNone(res[0])
|
||||||
self.assertEqual(res.count(res[0]), 20)
|
self.assertEqual(res.count(res[0]), 20)
|
||||||
self.assertEqual(len(album.album_map), 1)
|
self.assertEqual(len(album.album_map), 1)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
|
||||||
unittest.main()
|
|
||||||
|
|
|
@ -7,19 +7,7 @@ import xdg.BaseDirectory
|
||||||
xdg_data_home = xdg.BaseDirectory.xdg_data_home
|
xdg_data_home = xdg.BaseDirectory.xdg_data_home
|
||||||
testing_data = os.path.join(xdg_data_home, "emmental-testing")
|
testing_data = os.path.join(xdg_data_home, "emmental-testing")
|
||||||
|
|
||||||
class Test:
|
|
||||||
def __init__(self):
|
|
||||||
self.one = 1
|
|
||||||
self.two = 2
|
|
||||||
self.list = [ 3, 4, 5]
|
|
||||||
|
|
||||||
|
|
||||||
class TestDataModule(unittest.TestCase):
|
class TestDataModule(unittest.TestCase):
|
||||||
def setUp(self):
|
|
||||||
path = os.path.join(testing_data, "test")
|
|
||||||
if os.path.exists(path):
|
|
||||||
os.remove(path)
|
|
||||||
|
|
||||||
def test_dir(self):
|
def test_dir(self):
|
||||||
self.assertEqual(data.emmental_data, testing_data)
|
self.assertEqual(data.emmental_data, testing_data)
|
||||||
self.assertTrue(os.path.exists(testing_data))
|
self.assertTrue(os.path.exists(testing_data))
|
||||||
|
|
Loading…
Reference in New Issue