From 9a508cb3df7bf6fb18eecec035fb837d5076b067 Mon Sep 17 00:00:00 2001 From: clinton-hall Date: Mon, 11 Mar 2019 21:45:11 +1300 Subject: [PATCH] simply test of imports --- azure-pipelines.yml | 2 +- tests/general.py | 58 ++++----------------------------------------- 2 files changed, 5 insertions(+), 55 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index b695faf9..1a68748d 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -34,7 +34,7 @@ jobs: - script: | pip install pytest - pytest nzbToMedia.py --junitxml=junit/test-results.xml + pytest tests --doctest-modules --junitxml=junit/test-results.xml displayName: 'pytest' - task: PublishTestResults@2 diff --git a/tests/general.py b/tests/general.py index 4d9ad2af..6ee29314 100755 --- a/tests/general.py +++ b/tests/general.py @@ -2,7 +2,7 @@ from __future__ import print_function import eol -#eol.check() +eol.check() import cleanup cleanup.clean(cleanup.FOLDER_STRUCTURE) @@ -27,56 +27,6 @@ from core.utils import ( # Initialize the config core.initialize() -# label = core.TORRENT_CLASS.core.get_torrent_status('f33a9c4b15cbd9170722d700069af86746817ade', ['label']).get()['label'] -# print(label) - -#if transcoder.is_video_good(core.TEST_FILE, 0): -# print('FFPROBE Works') -#else: -# print('FFPROBE FAILED') - -test = core.CFG['SickBeard', 'NzbDrone']['tv'].isenabled() -print(test) -section = core.CFG.findsection('tv').isenabled() -print(section) -print(len(section)) -#fork, fork_params = auto_fork('SickBeard', 'tv') - -#if server_responding('http://127.0.0.1:5050'): -# print('CouchPotato Running') -#if server_responding('http://127.0.0.1:7073'): -# print('SickBeard Running') -#if server_responding('http://127.0.0.1:8181'): -# print('HeadPhones Running') -#if server_responding('http://127.0.0.1:8085'): -# print('Gamez Running') -#if server_responding('http://127.0.0.1:8090'): -# print('Mylar Running') - -#lan = 'pt' -#lan = Language.fromalpha2(lan) -#print(lan.alpha3) -#vidName = '/volume1/Public/Movies/A Few Good Men/A Few Good Men(1992).mkv' -#inputName = 'in.the.name.of.ben.hur.2016.bdrip.x264-rusted.nzb' -#guess = guessit.guessit(inputName) -#if guess: - # Movie Title -# title = None -# if 'title' in guess: -# title = guess['title'] - # Movie Year -# year = None -# if 'year' in guess: -# year = guess['year'] -# url = 'http://www.omdbapi.com' -# r = requests.get(url, params={'y': year, 't': title}, verify=False, timeout=(60, 300)) -# results = r.json() -# print(results) - -#subliminal.region.configure('dogpile.cache.dbm', arguments={'filename': 'cachefile.dbm'}) -#languages = set() -#languages.add(lan) -#video = subliminal.scan_video(vidName) -#subtitles = subliminal.download_best_subtitles({video}, languages) -#subliminal.save_subtitles(video, subtitles[video]) -del core.MYAPP +def test_answer(): + assert core.APP_NAME == "general.py" + del core.MYAPP