Add a toplevel script
I'll eventually need to be able to run everything as a single application, so let's prepare for that now. This gives us a chance to get the imports right from the start, rather than needing to go through and fix things up again. I also add a test to make sure everything works as expected. Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
This commit is contained in:
parent
5908a8af50
commit
2057721028
4
Makefile
4
Makefile
|
@ -8,10 +8,10 @@ clean:
|
|||
.PHONY: trier
|
||||
trier:
|
||||
python trier/generate_tracks.py
|
||||
EMMENTAL_TESTING=1 python -m unittest discover -v curds/
|
||||
EMMENTAL_TESTING=1 python -m unittest discover -v
|
||||
|
||||
.PHONY:cover
|
||||
cover:
|
||||
python trier/generate_tracks.py
|
||||
EMMENTAL_TESTING=1 coverage run -m unittest discover -v curds/
|
||||
EMMENTAL_TESTING=1 coverage run -m unittest discover -v
|
||||
coverage report -m
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
# Copyright 2019 (c) Anna Schumaker.
|
|
@ -1,5 +1,5 @@
|
|||
# Copyright 2019 (c) Anna Schumaker.
|
||||
import data
|
||||
from . import data
|
||||
import mutagen
|
||||
import os
|
||||
import re
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# Copyright 2019 (c) Anna Schumaker.
|
||||
import data
|
||||
from . import data
|
||||
import os
|
||||
import unittest
|
||||
import xdg.BaseDirectory
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# Copyright 2019 (c) Anna Schumaker.
|
||||
import data
|
||||
import tags
|
||||
import threadqueue
|
||||
from . import data
|
||||
from . import tags
|
||||
from . import threadqueue
|
||||
import unittest
|
||||
import os
|
||||
|
||||
|
@ -38,7 +38,6 @@ class TestTags(unittest.TestCase):
|
|||
tq = threadqueue.ThreadQueue()
|
||||
tracks = 0
|
||||
albums = 0
|
||||
tag_list = list(tags.tag_map)
|
||||
|
||||
self.assertFalse(dfile.exists())
|
||||
|
||||
|
@ -57,6 +56,7 @@ class TestTags(unittest.TestCase):
|
|||
tq.stop()
|
||||
self.assertEqual(len(tags.tag_map), tracks + albums)
|
||||
self.assertTrue(dfile.exists())
|
||||
tag_list = list(tags.tag_map.values())
|
||||
|
||||
tags.tag_map.clear()
|
||||
tags.load()
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# Copyright 2019 (c) Anna Schumaker.
|
||||
import tags
|
||||
from . import tags
|
||||
import unittest
|
||||
|
||||
album_info = {"album" : [ "Test Album" ], "albumartist" : [ "Test Artist" ],
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# Copyright 2019 (c) Anna Schumaker.
|
||||
from . import tags
|
||||
import os
|
||||
import tags
|
||||
import unittest
|
||||
|
||||
test_tracks = os.path.abspath("./trier/Test Album")
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
# Copyright 2019 (c) Anna Schumaker.
|
||||
from . import threadqueue
|
||||
import queue
|
||||
import unittest
|
||||
import threading
|
||||
import threadqueue
|
||||
|
||||
test_a = 0
|
||||
test_b = 0
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
#!/usr/bin/python
|
||||
# Copyright 2019 (c) Anna Schumaker.
|
||||
import curds
|
|
@ -0,0 +1,10 @@
|
|||
# Copyright 2019 (c) Anna Schumaker.
|
||||
import curds
|
||||
import unittest
|
||||
|
||||
class TestEmmental(unittest.TestCase):
|
||||
def test_import_curds(self):
|
||||
self.assertIsNotNone(curds)
|
||||
self.assertIsNotNone(curds.data)
|
||||
self.assertIsNotNone(curds.tags)
|
||||
self.assertIsNotNone(curds.threadqueue)
|
Loading…
Reference in New Issue