From 3ff3fbaf701da8dc2819714a69a42b37de107f62 Mon Sep 17 00:00:00 2001 From: Jan Hoek Date: Mon, 27 Mar 2017 20:41:21 +0200 Subject: [PATCH] Flake8; tests in relevant Python versions --- testnporecent.ps1 | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 testnporecent.ps1 diff --git a/testnporecent.ps1 b/testnporecent.ps1 new file mode 100644 index 000000000..f95778abd --- /dev/null +++ b/testnporecent.ps1 @@ -0,0 +1,43 @@ +Describe 'Flake8' { + It 'Does not return any errors' { + & flake8 /Users/jhoek/GitHub/youtube-dl/youtube_dl/extractor/npo.py | Should BeNullOrEmpty + } +} + +Describe 'Tests' { + It 'Should work in Python 2.6' { + & 'python2.6' '--version' 2>&1 | Should Be 'Python 2.6.9' + + '', '_1', '_2' | ForEach-Object { + & 'python2.6' /Users/jhoek/GitHub/youtube-dl/test/test_download.py "TestDownload.test_NPORecents$($_)" 2>&1 + $LASTEXITCODE | Should Be 0 + } + } + + It 'Should work in Python 2.7' { + & python '--version' 2>&1 | Should Be 'Python 2.7.13' + + '', '_1', '_2' | ForEach-Object { + & python /Users/jhoek/GitHub/youtube-dl/test/test_download.py "TestDownload.test_NPORecents$($_)" 2>&1 + $LASTEXITCODE | Should Be 0 + } + } + + It 'Should work in Python 3.5' { + & python3 '--version' | Should Be 'Python 3.5.2' + + '', '_1', '_2' | ForEach-Object { + & python3 /Users/jhoek/GitHub/youtube-dl/test/test_download.py "TestDownload.test_NPORecents$($_)" 2>&1 + $LASTEXITCODE | Should Be 0 + } + } + + It 'Should work in Python 3.6' { + & python3.6 '--version' | Should Be 'Python 3.6.1' + + '', '_1', '_2' | ForEach-Object { + & 'python3.6' /Users/jhoek/GitHub/youtube-dl/test/test_download.py "TestDownload.test_NPORecents$($_)" 2>&1 + $LASTEXITCODE | Should Be 0 + } + } +}