File tree Expand file tree Collapse file tree 4 files changed +24
-17
lines changed Expand file tree Collapse file tree 4 files changed +24
-17
lines changed Original file line number Diff line number Diff line change
1
+ * text =auto eol =lf
1
2
src /streamlink /_version.py export-subst
Original file line number Diff line number Diff line change 35
35
- name : Install dependencies
36
36
continue-on-error : ${{ matrix.continue || false }}
37
37
run : bash ./script/install-dependencies.sh
38
- - name : Lint
38
+ - name : Lint (flake8)
39
39
continue-on-error : ${{ matrix.continue || false }}
40
40
run : flake8 --count
41
+ - name : Lint (line terminators)
42
+ if : startsWith(matrix.os, 'ubuntu')
43
+ run : " ! grep 'with CRLF line terminators' <(git ls-files | file -nNf-)"
44
+ - name : Lint (file permissions)
45
+ if : startsWith(matrix.os, 'ubuntu')
46
+ run : " ! grep -Ev '^644' <(git ls-files src/ tests/ | xargs stat '--format=%a %n')"
41
47
- name : Test
42
48
continue-on-error : ${{ matrix.continue || false }}
43
49
run : pytest -r a --cov --cov-branch --cov-report=xml
Original file line number Diff line number Diff line change 1
- import unittest
2
-
3
- from streamlink .plugins .webcast_india_gov import WebcastIndiaGov
4
-
5
-
6
- class TestPluginWebcastIndiaGov (unittest .TestCase ):
7
- def test_can_handle_url (self ):
8
- # should match
9
- self .assertTrue (WebcastIndiaGov .can_handle_url ("http://webcast.gov.in/ddpunjabi/" ))
10
- self .assertTrue (WebcastIndiaGov .can_handle_url ("http://webcast.gov.in/#Channel1" ))
11
- self .assertTrue (WebcastIndiaGov .can_handle_url ("http://webcast.gov.in/#Channel3" ))
12
-
13
- # shouldn't match
14
- self .assertFalse (WebcastIndiaGov .can_handle_url ("http://meity.gov.in/" ))
15
- self .assertFalse (WebcastIndiaGov .can_handle_url ("http://www.nic.in/" ))
16
- self .assertFalse (WebcastIndiaGov .can_handle_url ("http://digitalindiaawards.gov.in/" ))
1
+ import unittest
2
+
3
+ from streamlink .plugins .webcast_india_gov import WebcastIndiaGov
4
+
5
+
6
+ class TestPluginWebcastIndiaGov (unittest .TestCase ):
7
+ def test_can_handle_url (self ):
8
+ # should match
9
+ self .assertTrue (WebcastIndiaGov .can_handle_url ("http://webcast.gov.in/ddpunjabi/" ))
10
+ self .assertTrue (WebcastIndiaGov .can_handle_url ("http://webcast.gov.in/#Channel1" ))
11
+ self .assertTrue (WebcastIndiaGov .can_handle_url ("http://webcast.gov.in/#Channel3" ))
12
+
13
+ # shouldn't match
14
+ self .assertFalse (WebcastIndiaGov .can_handle_url ("http://meity.gov.in/" ))
15
+ self .assertFalse (WebcastIndiaGov .can_handle_url ("http://www.nic.in/" ))
16
+ self .assertFalse (WebcastIndiaGov .can_handle_url ("http://digitalindiaawards.gov.in/" ))
You can’t perform that action at this time.
0 commit comments