How to use see method in lettuce_webdriver

Best Python code snippet using lettuce_webdriver_python

test_studio_video_transcript.py

Source:test_studio_video_transcript.py Github

copy

Full Screen

1# -*- coding: utf-8 -*-2"""3Acceptance tests for CMS Video Transcripts.4For transcripts acceptance tests there are 3 available caption5files. They can be used to test various transcripts features. Two of6them can be imported from YouTube.7The length of each file name is 11 characters. This is because the8YouTube's ID length is 11 characters. If file name is not of length 11,9front-end validation will not pass.10 t__eq_exist - this file exists on YouTube, and can be imported11 via the transcripts menu; after import, this file will12 be equal to the one stored locally13 t_neq_exist - same as above, except local file will differ from the14 one stored on YouTube15 t_not_exist - this file does not exist on YouTube; it exists locally16"""17from nose.plugins.attrib import attr18from .test_studio_video_module import CMSVideoBaseTest19@attr('shard_2')20class VideoTranscriptTest(CMSVideoBaseTest):21 """22 CMS Video Transcript Test Class23 """24 def setUp(self):25 super(VideoTranscriptTest, self).setUp()26 def _create_video_component(self, subtitles=False, subtitle_id='OEoXaMPEzfM'):27 """28 Create a video component and navigate to unit page29 Arguments:30 subtitles (bool): Upload subtitles or not31 subtitle_id (str): subtitle file id32 """33 if subtitles:34 self.assets.append('subs_{}.srt.sjson'.format(subtitle_id))35 self.navigate_to_course_unit()36 def test_input_validation(self):37 """38 Scenario: Check input error messages39 Given I have created a Video component40 Entering "123.webm" and "456.webm" source to field number 1 and 2 respectively should disable field 1 and 341 Then I see error message "Link types should be unique."42 When I clear fields, input fields should be enabled43 And I enter a "http://link.c" source to field number 1 should disable fields 2 and 344 Then I see error message "Incorrect url format."45 Entering "http://goo.gl/pxxZrg" source to both field number 1 and 2 should disable fields 1 and 346 Then I see error message "Links should be unique."47 When I clear fields, input fields should be enabled48 And I enter a "http://youtu.be/t_not_exist" source to field number 149 Then I do not see error message50 And I expect inputs are enabled51 """52 self._create_video_component()53 self.edit_component()54 #User inputs html5 links with equal extension55 self.video.set_url_field('123.webm', 1)56 self.video.set_url_field('456.webm', 2)57 self.assertEqual(self.video.message('error'), 'Link types should be unique.')58 # Currently we are working with 2nd field. It means, that if 2nd field59 # contain incorrect value, 1st and 3rd fields should be disabled until60 # 2nd field will be filled by correct correct value61 self.assertEqual(self.video.url_field_status(1, 3).values(), [False, False])62 self.video.clear_fields()63 self.assertEqual(self.video.url_field_status().values(), [True, True, True])64 #User input URL with incorrect format65 self.video.set_url_field('http://link.c', 1)66 self.assertEqual(self.video.message('error'), 'Incorrect url format.')67 self.assertEqual(self.video.url_field_status(2, 3).values(), [False, False])68 #User input URL with incorrect format69 self.video.set_url_field('http://goo.gl/pxxZrg', 1)70 self.video.set_url_field('http://goo.gl/pxxZrg', 2)71 self.assertEqual(self.video.message('error'), 'Links should be unique.')72 self.assertEqual(self.video.url_field_status(1, 3).values(), [False, False])73 self.video.clear_fields()74 self.assertEqual(self.video.url_field_status().values(), [True, True, True])75 self.video.set_url_field('http://youtu.be/t_not_exist', 1)76 self.assertEqual(self.video.message('error'), '')77 self.assertEqual(self.video.url_field_status().values(), [True, True, True])78 def test_youtube_server_interaction(self):79 """80 Scenario: Testing interaction with test youtube server81 Given I have created a Video component with subtitles82 And I enter a "http://youtu.be/t__eq_exist" source to field number 183 Then I see status message "No EdX Timed Transcript"84 And I see button "import"85 And I enter a "http://youtu.be/t_not_exist" source to field number 186 Then I see status message "No Timed Transcript"87 And I do not see button "import"88 And I see button "disabled_download_to_edit"89 """90 self._create_video_component(subtitles=True)91 self.edit_component()92 # first part of url will be substituted by mock_youtube_server address93 # for t__eq_exist id server will respond with transcripts94 self.video.set_url_field('http://youtu.be/t__eq_exist', 1)95 self.assertEqual(self.video.message('status'), 'No EdX Timed Transcript')96 self.assertTrue(self.video.is_transcript_button_visible('import'))97 self.video.set_url_field('http://youtu.be/t_not_exist', 1)98 self.assertEqual(self.video.message('status'), 'No Timed Transcript')99 self.assertFalse(self.video.is_transcript_button_visible('import'))100 self.assertTrue(self.video.is_transcript_button_visible('disabled_download_to_edit'))101 def test_youtube_id_w_found_state(self):102 """103 Scenario: Youtube id only: check "Found" state104 Given I have created a Video component with subtitles "t_not_exist"105 And I enter a "http://youtu.be/t_not_exist" source to field number 1106 Then I see status message "Timed Transcript Found"107 And I see value "t_not_exist" in the field "Default Timed Transcript"108 """109 self._create_video_component(subtitles=True, subtitle_id='t_not_exist')110 self.edit_component()111 self.video.set_url_field('http://youtu.be/t_not_exist', 1)112 self.assertEqual(self.video.message('status'), 'Timed Transcript Found')113 self.open_advanced_tab()114 self.assertTrue(self.video.verify_field_value('Default Timed Transcript', 't_not_exist'))115 def test_youtube_id_w_same_local_server_subs(self):116 """117 Scenario: Youtube id only: check "Found" state when user sets youtube_id with same local and server subs118 Given I have created a Video component with subtitles "t__eq_exist"119 And I enter a "http://youtu.be/t__eq_exist" source to field number 1120 And I see status message "Timed Transcript Found"121 And I see value "t__eq_exist" in the field "Default Timed Transcript"122 """123 self._create_video_component(subtitles=True, subtitle_id='t__eq_exist')124 self.edit_component()125 self.video.set_url_field('http://youtu.be/t__eq_exist', 1)126 self.assertEqual(self.video.message('status'), 'Timed Transcript Found')127 self.open_advanced_tab()128 self.assertTrue(self.video.verify_field_value('Default Timed Transcript', 't__eq_exist'))129 def test_youtube_id_w_different_local_server_sub(self):130 """131 Scenario: Youtube id only: check "Found" state when user sets youtube_id with different local and server subs132 Given I have created a Video component with subtitles "t_neq_exist"133 And I enter a "http://youtu.be/t_neq_exist" source to field number 1134 And I see status message "Timed Transcript Conflict"135 And I see button "replace"136 And I click transcript button "replace"137 And I see status message "Timed Transcript Found"138 And I see value "t_neq_exist" in the field "Default Timed Transcript"139 """140 self._create_video_component(subtitles=True, subtitle_id='t_neq_exist')141 self.edit_component()142 self.video.set_url_field('http://youtu.be/t_neq_exist', 1)143 self.assertEqual(self.video.message('status'), 'Timed Transcript Conflict')144 self.assertTrue(self.video.is_transcript_button_visible('replace'))145 self.video.click_button('replace')146 self.assertEqual(self.video.message('status'), 'Timed Transcript Found')147 self.open_advanced_tab()148 self.assertTrue(self.video.verify_field_value('Default Timed Transcript', 't_neq_exist'))149 def test_html5_source_w_not_found_state(self):150 """151 Scenario: html5 source only: check "Not Found" state152 Given I have created a Video component153 And I enter a "t_not_exist.mp4" source to field number 1154 Then I see status message "No Timed Transcript"155 And I see value "" in the field "Default Timed Transcript"156 """157 self._create_video_component()158 self.edit_component()159 self.video.set_url_field('t_not_exist.mp4', 1)160 self.assertEqual(self.video.message('status'), 'No Timed Transcript')161 self.open_advanced_tab()162 self.assertTrue(self.video.verify_field_value('Default Timed Transcript', ''))163 def test_html5_source_w_found_state(self):164 """165 Scenario: html5 source only: check "Found" state166 Given I have created a Video component with subtitles "t_not_exist"167 And I enter a "t_not_exist.mp4" source to field number 1168 Then I see status message "Timed Transcript Found"169 And I see value "t_not_exist" in the field "Default Timed Transcript"170 """171 self._create_video_component(subtitles=True, subtitle_id='t_not_exist')172 self.edit_component()173 self.video.set_url_field('t_not_exist.mp4', 1)174 self.assertEqual(self.video.message('status'), 'Timed Transcript Found')175 self.open_advanced_tab()176 self.assertTrue(self.video.verify_field_value('Default Timed Transcript', 't_not_exist'))177 def test_set_youtube_id_wo_server(self):178 """179 Scenario: User sets youtube_id w/o server but with local subs and one html5 link w/o subs180 Given I have created a Video component with subtitles "t_not_exist"181 urls = ['http://youtu.be/t_not_exist', 'test_video_name.mp4']182 for each url in urls do the following183 Enter `url` to field number n184 Status message "Timed Transcript Found" is shown185 And I see value "t_not_exist" in the field "Default Timed Transcript"186 """187 self._create_video_component(subtitles=True, subtitle_id='t_not_exist')188 self.edit_component()189 urls = ['http://youtu.be/t_not_exist', 'test_video_name.mp4']190 for index, url in enumerate(urls, 1):191 self.video.set_url_field(url, index)192 self.assertEqual(self.video.message('status'), 'Timed Transcript Found')193 self.open_advanced_tab()194 self.assertTrue(self.video.verify_field_value('Default Timed Transcript', 't_not_exist'))195 def test_set_youtube_id_wo_local(self):196 """197        Scenario: User sets youtube_id w/o local but with server subs and one html5 link w/o198                  transcripts w/o import action, then another one html5 link w/o transcripts199        Given I have created a Video component200        urls = ['http://youtu.be/t__eq_exist', 't_not_exist.mp4', 't_not_exist.webm']201        for each url in urls do the following202            Enter `url` to field number `n`203            Status message `No EdX Timed Transcript` is shown204            `import` and `upload_new_timed_transcripts` are shown205        """206 self._create_video_component()207 self.edit_component()208 urls = ['http://youtu.be/t__eq_exist', 't_not_exist.mp4', 't_not_exist.webm']209 for index, url in enumerate(urls, 1):210 self.video.set_url_field(url, index)211 self.assertEqual(self.video.message('status'), 'No EdX Timed Transcript')212 self.assertTrue(self.video.is_transcript_button_visible('import'))213 self.assertTrue(self.video.is_transcript_button_visible('upload_new_timed_transcripts'))214 def test_youtube_no_import(self):215 """216 Scenario: Entering youtube (no importing), and 2 html5 sources without transcripts - "Not Found"217 Given I have created a Video component218 urls = ['http://youtu.be/t_not_exist', 't_not_exist.mp4', 't_not_exist.webm']219 for each url in urls do the following220            Enter `url` to field number `n`221            Status message `No Timed Transcript` is shown222            `disabled_download_to_edit` and `upload_new_timed_transcripts` buttons are shown223 """224 self._create_video_component()225 self.edit_component()226 urls = ['http://youtu.be/t_not_exist', 't_not_exist.mp4', 't_not_exist.webm']227 for index, url in enumerate(urls, 1):228 self.video.set_url_field(url, index)229 self.assertEqual(self.video.message('status'), 'No Timed Transcript')230 self.assertTrue(self.video.is_transcript_button_visible('disabled_download_to_edit'))231 self.assertTrue(self.video.is_transcript_button_visible('upload_new_timed_transcripts'))232 def test_youtube_with_import(self):233 """234 Scenario: Entering youtube with imported transcripts, and 2 html5 sources without transcripts - "Found"235 Given I have created a Video component236 And I enter a "http://youtu.be/t__eq_exist" source to field number 1237 Then I see status message "No EdX Timed Transcript"238 And I see button "import"239 And I click transcript button "import"240 Then I see status message "Timed Transcript Found"241 And I see button "upload_new_timed_transcripts"242 urls = ['t_not_exist.mp4', 't_not_exist.webm']243 for each url in urls do the following244            Enter `url` to field number `n`245            Status message `Timed Transcript Found` is shown246            `download_to_edit` and `upload_new_timed_transcripts` buttons are shown247 """248 self._create_video_component()249 self.edit_component()250 self.video.set_url_field('http://youtu.be/t__eq_exist', 1)251 self.assertEqual(self.video.message('status'), 'No EdX Timed Transcript')252 self.assertTrue(self.video.is_transcript_button_visible('import'))253 self.video.click_button('import')254 self.assertEqual(self.video.message('status'), 'Timed Transcript Found')255 self.assertTrue(self.video.is_transcript_button_visible('upload_new_timed_transcripts'))256 urls = ['t_not_exist.mp4', 't_not_exist.webm']257 for index, url in enumerate(urls, 2):258 self.video.set_url_field(url, index)259 self.assertEqual(self.video.message('status'), 'Timed Transcript Found')260 self.assertTrue(self.video.is_transcript_button_visible('download_to_edit'))261 self.assertTrue(self.video.is_transcript_button_visible('upload_new_timed_transcripts'))262 def test_youtube_wo_transcripts(self):263 """264 Scenario: Entering youtube w/o transcripts - html5 w/o transcripts - html5 with transcripts265 Given I have created a Video component with subtitles "t_neq_exist"266 urls = ['http://youtu.be/t_not_exist', 't_not_exist.mp4']267 for each url in urls do the following268            Enter `url` to field number `n`269            Status message `No Timed Transcript` is shown270            `disabled_download_to_edit` and `upload_new_timed_transcripts` buttons are shown271 And I enter a "t_neq_exist.webm" source to field number 3272 Then I see status message "Timed Transcript Found"273 `download_to_edit` and `upload_new_timed_transcripts` buttons are shown274 """275 self._create_video_component(subtitles=True, subtitle_id='t_neq_exist')276 self.edit_component()277 urls = ['http://youtu.be/t_not_exist', 't_not_exist.mp4']278 for index, url in enumerate(urls, 1):279 self.video.set_url_field(url, index)280 self.assertEqual(self.video.message('status'), 'No Timed Transcript')281 self.assertTrue(self.video.is_transcript_button_visible('disabled_download_to_edit'))282 self.assertTrue(self.video.is_transcript_button_visible('upload_new_timed_transcripts'))283 self.video.set_url_field('t_neq_exist.webm', 3)284 self.assertEqual(self.video.message('status'), 'Timed Transcript Found')285 self.assertTrue(self.video.is_transcript_button_visible('download_to_edit'))286 self.assertTrue(self.video.is_transcript_button_visible('upload_new_timed_transcripts'))287 def test_youtube_wo_imported_transcripts(self):288 """289 Scenario: Entering youtube w/o imported transcripts - html5 w/o transcripts w/o import - html5 with transcripts290 Given I have created a Video component with subtitles "t_neq_exist"291 urls = ['http://youtu.be/t__eq_exist', 't_not_exist.mp4', 't_neq_exist.webm']292 for each url in urls do the following293            Enter `url` to field number `n`294            Status message `No EdX Timed Transcript` is shown295            `import` and `upload_new_timed_transcripts` buttons are shown296 """297 self._create_video_component(subtitles=True, subtitle_id='t_neq_exist')298 self.edit_component()299 urls = ['http://youtu.be/t__eq_exist', 't_not_exist.mp4', 't_neq_exist.webm']300 for index, url in enumerate(urls, 1):301 self.video.set_url_field(url, index)302 self.assertEqual(self.video.message('status'), 'No EdX Timed Transcript')303 self.assertTrue(self.video.is_transcript_button_visible('import'))304 self.assertTrue(self.video.is_transcript_button_visible('upload_new_timed_transcripts'))305 def test_youtube_wo_imported_transcripts2(self):306 """307 Scenario: Entering youtube w/o imported transcripts - html5 with transcripts - html5 w/o transcripts w/o import308 Given I have created a Video component with subtitles "t_neq_exist"309 urls = ['http://youtu.be/t__eq_exist', 't_neq_exist.mp4', 't_not_exist.webm']310 for each url in urls do the following311            Enter `url` to field number `n`312            Status message `No EdX Timed Transcript` is shown313            `import` and `upload_new_timed_transcripts` buttons are shown314 """315 self._create_video_component(subtitles=True, subtitle_id='t_neq_exist')316 self.edit_component()317 urls = ['http://youtu.be/t__eq_exist', 't_neq_exist.mp4', 't_not_exist.webm']318 for index, url in enumerate(urls, 1):319 self.video.set_url_field(url, index)320 self.assertEqual(self.video.message('status'), 'No EdX Timed Transcript')321 self.assertTrue(self.video.is_transcript_button_visible('import'))322 self.assertTrue(self.video.is_transcript_button_visible('upload_new_timed_transcripts'))323 def test_youtube_w_imported_transcripts(self):324 """325 Scenario: Entering youtube with imported transcripts - html5 with transcripts - html5 w/o transcripts326 Given I have created a Video component with subtitles "t_neq_exist"327 And I enter a "http://youtu.be/t__eq_exist" source to field number 1328 Then I see status message "No EdX Timed Transcript"329 And I see button "import"330 And I click transcript button "import"331 Then I see status message "Timed Transcript Found"332 And I see button "upload_new_timed_transcripts"333 urls = ['t_neq_exist.mp4', 't_not_exist.webm']334 for each url in urls do the following335            Enter `url` to field number `n`336            Status message `Timed Transcript Found` is shown337            `download_to_edit` and `upload_new_timed_transcripts` buttons are shown338 """339 self._create_video_component(subtitles=True, subtitle_id='t_neq_exist')340 self.edit_component()341 self.video.set_url_field('http://youtu.be/t__eq_exist', 1)342 self.assertEqual(self.video.message('status'), 'No EdX Timed Transcript')343 self.assertTrue(self.video.is_transcript_button_visible('import'))344 self.video.click_button('import')345 self.assertEqual(self.video.message('status'), 'Timed Transcript Found')346 self.assertTrue(self.video.is_transcript_button_visible('upload_new_timed_transcripts'))347 urls = ['t_neq_exist.mp4', 't_not_exist.webm']348 for index, url in enumerate(urls, 2):349 self.video.set_url_field(url, index)350 self.assertEqual(self.video.message('status'), 'Timed Transcript Found')351 self.assertTrue(self.video.is_transcript_button_visible('download_to_edit'))352 self.assertTrue(self.video.is_transcript_button_visible('upload_new_timed_transcripts'))353 def test_youtube_w_imported_transcripts2(self):354 """355 Scenario: Entering youtube with imported transcripts - html5 w/o transcripts - html5 with transcripts356 Given I have created a Video component with subtitles "t_neq_exist"357 And I enter a "http://youtu.be/t__eq_exist" source to field number 1358 Then I see status message "No EdX Timed Transcript"359 And I see button "import"360 And I click transcript button "import"361 Then I see status message "Timed Transcript Found"362 And I see button "upload_new_timed_transcripts"363 urls = ['t_not_exist.mp4', 't_neq_exist.webm']364 for each url in urls do the following365            Enter `url` to field number `n`366            Status message `Timed Transcript Found` is shown367            `download_to_edit` and `upload_new_timed_transcripts` buttons are shown368 """369 self._create_video_component(subtitles=True, subtitle_id='t_neq_exist')370 self.edit_component()371 self.video.set_url_field('http://youtu.be/t__eq_exist', 1)372 self.assertEqual(self.video.message('status'), 'No EdX Timed Transcript')373 self.assertTrue(self.video.is_transcript_button_visible('import'))374 self.video.click_button('import')375 self.assertEqual(self.video.message('status'), 'Timed Transcript Found')376 self.assertTrue(self.video.is_transcript_button_visible('upload_new_timed_transcripts'))377 urls = ['t_not_exist.mp4', 't_neq_exist.webm']378 for index, url in enumerate(urls, 2):379 self.video.set_url_field(url, index)380 self.assertEqual(self.video.message('status'), 'Timed Transcript Found')381 self.assertTrue(self.video.is_transcript_button_visible('download_to_edit'))382 self.assertTrue(self.video.is_transcript_button_visible('upload_new_timed_transcripts'))383 def test_html5_with_transcripts(self):384 """385 Scenario: Entering html5 with transcripts - upload - youtube w/o transcripts386 Given I have created a Video component with subtitles "t__eq_exist"387 And I enter a "t__eq_exist.mp4" source to field number 1388 Then I see status message "Timed Transcript Found"389 `download_to_edit` and `upload_new_timed_transcripts` buttons are shown390 And I upload the transcripts file "uk_transcripts.srt"391 Then I see status message "Timed Transcript Uploaded Successfully"392 `download_to_edit` and `upload_new_timed_transcripts` buttons are shown393 And I see value "t__eq_exist" in the field "Default Timed Transcript"394 And I enter a "http://youtu.be/t_not_exist" source to field number 2395 Then I see status message "Timed Transcript Found"396 `download_to_edit` and `upload_new_timed_transcripts` buttons are shown397 And I enter a "uk_transcripts.webm" source to field number 3398 Then I see status message "Timed Transcript Found"399 """400 self._create_video_component(subtitles=True, subtitle_id='t__eq_exist')401 self.edit_component()402 self.video.set_url_field('t__eq_exist.mp4', 1)403 self.assertEqual(self.video.message('status'), 'Timed Transcript Found')404 self.assertTrue(self.video.is_transcript_button_visible('download_to_edit'))405 self.assertTrue(self.video.is_transcript_button_visible('upload_new_timed_transcripts'))406 self.video.upload_transcript('uk_transcripts.srt')407 self.assertEqual(self.video.message('status'), 'Timed Transcript Uploaded Successfully')408 self.assertTrue(self.video.is_transcript_button_visible('download_to_edit'))409 self.assertTrue(self.video.is_transcript_button_visible('upload_new_timed_transcripts'))410 self.open_advanced_tab()411 self.assertTrue(self.video.verify_field_value('Default Timed Transcript', 't__eq_exist'))412 self.open_basic_tab()413 self.video.set_url_field('http://youtu.be/t_not_exist', 2)414 self.assertEqual(self.video.message('status'), 'Timed Transcript Found')415 self.assertTrue(self.video.is_transcript_button_visible('download_to_edit'))416 self.assertTrue(self.video.is_transcript_button_visible('upload_new_timed_transcripts'))417 self.video.set_url_field('uk_transcripts.webm', 3)418 self.assertEqual(self.video.message('status'), 'Timed Transcript Found')419 def test_two_html5_sources_w_transcripts(self):420 """421 Scenario: Enter 2 HTML5 sources with transcripts, they are not the same, choose422 Given I have created a Video component with subtitles "t_not_exist"423 And I enter a "uk_transcripts.mp4" source to field number 1424 Then I see status message "No Timed Transcript"425 `download_to_edit` and `upload_new_timed_transcripts` buttons are shown426 And I upload the transcripts file "uk_transcripts.srt"427 Then I see status message "Timed Transcript Uploaded Successfully"428 And I see value "uk_transcripts" in the field "Default Timed Transcript"429 And I enter a "t_not_exist.webm" source to field number 2430 Then I see status message "Timed Transcript Conflict"431 `Timed Transcript from uk_transcripts.mp4` and `Timed Transcript from t_not_exist.webm` buttons are shown432 And I click transcript button "Timed Transcript from t_not_exist.webm"433 And I see value "uk_transcripts|t_not_exist" in the field "Default Timed Transcript"434 """435 self._create_video_component(subtitles=True, subtitle_id='t_not_exist')436 self.edit_component()437 self.video.set_url_field('uk_transcripts.mp4', 1)438 self.assertEqual(self.video.message('status'), 'No Timed Transcript')439 self.assertTrue(self.video.is_transcript_button_visible('download_to_edit'))440 self.assertTrue(self.video.is_transcript_button_visible('upload_new_timed_transcripts'))441 self.video.upload_transcript('uk_transcripts.srt')442 self.assertEqual(self.video.message('status'), 'Timed Transcript Uploaded Successfully')443 self.open_advanced_tab()444 self.assertTrue(self.video.verify_field_value('Default Timed Transcript', 'uk_transcripts'))445 self.open_basic_tab()446 self.video.set_url_field('t_not_exist.webm', 2)447 self.assertEqual(self.video.message('status'), 'Timed Transcript Conflict')448 self.assertTrue(449 self.video.is_transcript_button_visible('choose', button_text='Timed Transcript from uk_transcripts.mp4'))450 self.assertTrue(self.video.is_transcript_button_visible('choose', index=1,451 button_text='Timed Transcript from t_not_exist.webm'))452 def test_one_field_only(self):453 """454 Scenario: Work with 1 field only: Enter HTML5 source with transcripts - save -> change it to another one455 HTML5 source w/o transcripts - click on use existing -> change it to another one HTML5 source456 w/o transcripts - do not click on use existing -> change it to another one HTML5 source w/o457 transcripts - click on use existing458 Given I have created a Video component with subtitles "t_not_exist"459 If i enter "t_not_exist.mp4" source to field number 1 Then I see status message "Timed Transcript Found"460 `download_to_edit` and `upload_new_timed_transcripts` buttons are shown461 And I see value "t_not_exist" in the field "Default Timed Transcript"462 And I save changes And then edit the component463 If i enter "video_name_2.mp4" source to field number 1 Then I see status message "Confirm Timed Transcript"464 I see button "use_existing" And I click on it465 And I see value "video_name_2" in the field "Default Timed Transcript"466 If i enter "video_name_3.mp4" source to field number 1 Then I see status message "Confirm Timed Transcript"467 And I see button "use_existing"468 If i enter a "video_name_4.mp4" source to field number 1 Then I see status message "Confirm Timed Transcript"469 I see button "use_existing" And I click on it470 And I see value "video_name_4" in the field "Default Timed Transcript"471 """472 self._create_video_component(subtitles=True, subtitle_id='t_not_exist')473 self.edit_component()474 self.video.set_url_field('t_not_exist.mp4', 1)475 self.assertEqual(self.video.message('status'), 'Timed Transcript Found')476 self.assertTrue(self.video.is_transcript_button_visible('download_to_edit'))477 self.assertTrue(self.video.is_transcript_button_visible('upload_new_timed_transcripts'))478 self.open_advanced_tab()479 self.assertTrue(self.video.verify_field_value('Default Timed Transcript', 't_not_exist'))480 self.open_basic_tab()481 self.save_unit_settings()482 self.edit_component()483 self.video.set_url_field('video_name_2.mp4', 1)484 self.assertEqual(self.video.message('status'), 'Confirm Timed Transcript')485 self.assertTrue(self.video.is_transcript_button_visible('use_existing'))486 self.video.click_button('use_existing')487 self.assertTrue(self.video.is_transcript_button_visible('upload_new_timed_transcripts'))488 self.open_advanced_tab()489 self.assertTrue(self.video.verify_field_value('Default Timed Transcript', 'video_name_2'))490 self.open_basic_tab()491 self.video.set_url_field('video_name_3.mp4', 1)492 self.assertEqual(self.video.message('status'), 'Confirm Timed Transcript')493 self.assertTrue(self.video.is_transcript_button_visible('use_existing'))494 self.video.set_url_field('video_name_4.mp4', 1)495 self.assertEqual(self.video.message('status'), 'Confirm Timed Transcript')496 self.assertTrue(self.video.is_transcript_button_visible('use_existing'))497 self.video.click_button('use_existing')498 self.open_advanced_tab()499 self.assertTrue(self.video.verify_field_value('Default Timed Transcript', 'video_name_4'))500 def test_two_fields_only(self):501 """502 Scenario: Work with 2 fields: Enter HTML5 source with transcripts - save -> change it to another one HTML5503 source w/o transcripts - do not click on use existing -> add another one HTML5 source w/o504 transcripts - click on use existing505 Given I have created a Video component with subtitles "t_not_exist"506 And I enter a "t_not_exist.mp4" source to field number 1507 Then I see status message "Timed Transcript Found"508 `download_to_edit` and `upload_new_timed_transcripts` buttons are shown509 And I save changes510 And I edit the component511 And I enter a "video_name_2.mp4" source to field number 1512 Then I see status message "Confirm Timed Transcript"513 And I see button "use_existing"514 And I enter a "video_name_3.webm" source to field number 2515 Then I see status message "Confirm Timed Transcript"516 And I see button "use_existing"517 And I click transcript button "use_existing"518 And I see value "video_name_3" in the field "Default Timed Transcript"519 """520 self._create_video_component(subtitles=True, subtitle_id='t_not_exist')521 self.edit_component()522 self.video.set_url_field('t_not_exist.mp4', 1)523 self.assertEqual(self.video.message('status'), 'Timed Transcript Found')524 self.assertTrue(self.video.is_transcript_button_visible('download_to_edit'))525 self.assertTrue(self.video.is_transcript_button_visible('upload_new_timed_transcripts'))526 self.save_unit_settings()527 self.edit_component()528 self.video.set_url_field('video_name_2.mp4', 1)529 self.assertEqual(self.video.message('status'), 'Confirm Timed Transcript')530 self.assertTrue(self.video.is_transcript_button_visible('use_existing'))531 self.video.set_url_field('video_name_3.webm', 2)532 self.assertEqual(self.video.message('status'), 'Confirm Timed Transcript')533 self.assertTrue(self.video.is_transcript_button_visible('use_existing'))534 self.video.click_button('use_existing')535 self.open_advanced_tab()536 self.assertTrue(self.video.verify_field_value('Default Timed Transcript', 'video_name_3'))537 def test_upload_subtitles(self):538 """539 Scenario: File name and name of subs are different (Uploading subtitles with different file name than file)540 Given I have created a Video component541 And I enter a "video_name_1.mp4" source to field number 1542 And I see status message "No Timed Transcript"543 And I upload the transcripts file "uk_transcripts.srt"544 Then I see status message "Timed Transcript Uploaded Successfully"545 And I see value "video_name_1" in the field "Default Timed Transcript"546 And I save changes547 Then when I view the video it does show the captions548 And I edit the component549 Then I see status message "Timed Transcript Found"550 """551 self._create_video_component()552 self.edit_component()553 self.video.set_url_field('video_name_1.mp4', 1)554 self.assertEqual(self.video.message('status'), 'No Timed Transcript')555 self.video.upload_transcript('uk_transcripts.srt')556 self.assertEqual(self.video.message('status'), 'Timed Transcript Uploaded Successfully')557 self.open_advanced_tab()558 self.assertTrue(self.video.verify_field_value('Default Timed Transcript', 'video_name_1'))559 self.save_unit_settings()560 self.video.is_captions_visible()561 self.edit_component()562 self.assertEqual(self.video.message('status'), 'Timed Transcript Found')563 def test_video_wo_subtitles(self):564 """565 Scenario: Video w/o subs - another video w/o subs - Not found message566 Video can have filled item.sub, but doesn't have subs file.567 In this case, after changing this video by another one without subs568 `No Timed Transcript` message should appear ( not 'Confirm Timed Transcript').569 Given I have created a Video component570 And I enter a "video_name_1.mp4" source to field number 1571 Then I see status message "No Timed Transcript"572 """573 self._create_video_component()574 self.edit_component()575 self.video.set_url_field('video_name_1.mp4', 1)576 self.assertEqual(self.video.message('status'), 'No Timed Transcript')577 def test_subtitles_copy(self):578 """579 Scenario: Subtitles are copied for every html5 video source580 Given I have created a Video component581 After I enter a "video_name_1.mp4" source to field number 1 Then I see status message "No Timed Transcript"582 After I enter a "video_name_2.webm" source to field number 2 Then I see status message "No Timed Transcript"583 After uploading transcript "uk_transcripts.srt" I should see message "Timed Transcript Uploaded Successfully"584 And I see value "video_name_2" in the field "Default Timed Transcript"585 When I clear field number 1 Then I see status message "Timed Transcript Found"586 And I see value "video_name_2" in the field "Default Timed Transcript"587 """588 self._create_video_component()589 self.edit_component()590 self.video.set_url_field('video_name_1.mp4', 1)591 self.assertEqual(self.video.message('status'), 'No Timed Transcript')592 self.video.set_url_field('video_name_2.webm', 2)593 self.assertEqual(self.video.message('status'), 'No Timed Transcript')594 self.video.upload_transcript('uk_transcripts.srt')595 self.assertEqual(self.video.message('status'), 'Timed Transcript Uploaded Successfully')596 self.open_advanced_tab()597 self.assertTrue(self.video.verify_field_value('Default Timed Transcript', 'video_name_2'))598 self.open_basic_tab()599 self.video.clear_field(1)600 self.assertEqual(self.video.message('status'), 'Timed Transcript Found')601 self.open_advanced_tab()602 self.assertTrue(self.video.verify_field_value('Default Timed Transcript', 'video_name_2'))603 def test_upload_button_w_youtube(self):604 """605 Scenario: Upload button for single youtube id606 Given I have created a Video component607 After I enter a "http://youtu.be/t_not_exist" source to field number 1 I see message "No Timed Transcript"608 And I see button "upload_new_timed_transcripts"609 After I upload the transcripts file "uk_transcripts.srt" I see message "Timed Transcript Uploaded Successfully"610 After saving the changes video captions should be visible611 When I edit the component Then I see status message "Timed Transcript Found"612 """613 self._create_video_component()614 self.edit_component()615 self.video.set_url_field('http://youtu.be/t_not_exist', 1)616 self.assertEqual(self.video.message('status'), 'No Timed Transcript')617 self.assertTrue(self.video.is_transcript_button_visible('upload_new_timed_transcripts'))618 self.video.upload_transcript('uk_transcripts.srt')619 self.assertEqual(self.video.message('status'), 'Timed Transcript Uploaded Successfully')620 self.save_unit_settings()621 self.assertTrue(self.video.is_captions_visible())622 self.edit_component()623 self.assertEqual(self.video.message('status'), 'Timed Transcript Found')624 def test_upload_button_w_html5_ids(self):625 """626 Scenario: Upload button for youtube id with html5 ids627 Given I have created a Video component628 After I enter a "http://youtu.be/t_not_exist" source to field number 1 I see message "No Timed Transcript"629 And I see button "upload_new_timed_transcripts"630 After I enter a "video_name_1.mp4" source to field number 2 Then I see status message "No Timed Transcript"631 And I see button "upload_new_timed_transcripts"632 After I upload the transcripts file "uk_transcripts.srt"I see message "Timed Transcript Uploaded Successfully"633 When I clear field number 1 Then I see status message "Timed Transcript Found"634 And I see value "video_name_1" in the field "Default Timed Transcript"635 After saving the changes video captions should be visible636 When I edit the component Then I see status message "Timed Transcript Found"637 """638 self._create_video_component()639 self.edit_component()640 self.video.set_url_field('http://youtu.be/t_not_exist', 1)641 self.assertEqual(self.video.message('status'), 'No Timed Transcript')642 self.assertTrue(self.video.is_transcript_button_visible('upload_new_timed_transcripts'))643 self.video.set_url_field('video_name_1.mp4', 2)644 self.assertEqual(self.video.message('status'), 'No Timed Transcript')645 self.assertTrue(self.video.is_transcript_button_visible('upload_new_timed_transcripts'))646 self.video.upload_transcript('uk_transcripts.srt')647 self.assertEqual(self.video.message('status'), 'Timed Transcript Uploaded Successfully')648 self.video.clear_field(1)649 self.assertEqual(self.video.message('status'), 'Timed Transcript Found')650 self.open_advanced_tab()651 self.assertTrue(self.video.verify_field_value('Default Timed Transcript', 'video_name_1'))652 self.save_unit_settings()653 self.assertTrue(self.video.is_captions_visible())654 self.edit_component()655 self.assertEqual(self.video.message('status'), 'Timed Transcript Found')656 def test_advanced_tab_transcript_fields(self):657 """658 Scenario: Change transcripts field in Advanced tab659 Given I have created a Video component with subtitles "t_not_exist"660 After I enter a "video_name_1.mp4" source to field number 1 Then I see status message "No Timed Transcript"661 Open tab "Advanced" and set value "t_not_exist" to the field "Default Timed Transcript"662 After saving the changes video captions should be visible663 When I edit the component Then I see status message "Timed Transcript Found"664 And I see value "video_name_1" in the field "Default Timed Transcript"665 """666 self._create_video_component(subtitles=True, subtitle_id='t_not_exist')667 self.edit_component()668 self.video.set_url_field('video_name_1.mp4', 1)669 self.assertEqual(self.video.message('status'), 'No Timed Transcript')670 self.open_advanced_tab()671 self.video.set_field_value('Default Timed Transcript', 't_not_exist')672 self.save_unit_settings()673 self.assertTrue(self.video.is_captions_visible())674 self.edit_component()675 self.assertEqual(self.video.message('status'), 'Timed Transcript Found')676 self.assertTrue(self.video.verify_field_value('Default Timed Transcript', 'video_name_1'))677 def test_non_ascii_transcripts(self):678 """679 Scenario: Check non-ascii (chinese) transcripts680 Given I have created a Video component681 After I enter a "video_name_1.mp4" source to field number 1 Then I see status message "No Timed Transcript"682 After I upload the transcripts "chinese_transcripts.srt" I see message "Timed Transcript Uploaded Successfully"683 After saving the changes video captions should be visible684 """685 self._create_video_component()686 self.edit_component()687 self.video.set_url_field('video_name_1.mp4', 1)688 self.assertEqual(self.video.message('status'), 'No Timed Transcript')689 self.video.upload_transcript('chinese_transcripts.srt')690 self.assertEqual(self.video.message('status'), 'Timed Transcript Uploaded Successfully')691 self.save_unit_settings()692 self.assertTrue(self.video.is_captions_visible())693 def test_module_metadata_save(self):694 """695 Scenario: Check saving module metadata on switching between tabs696 Given I have created a Video component with subtitles "t_not_exist"697 After I enter a "video_name_1.mp4" source to field number 1 I should see status message "No Timed Transcript"698 Open tab "Advanced" and set value "t_not_exist" to the field "Default Timed Transcript"699 When I open tab "Basic" Then I see status message "Timed Transcript Found"700 After saving the changes video captions should be visible701 When I edit the component I should see status message "Timed Transcript Found"702 And I see value "video_name_1" in the field "Default Timed Transcript"703 """704 self._create_video_component(subtitles=True, subtitle_id='t_not_exist')705 self.edit_component()706 self.video.set_url_field('video_name_1.mp4', 1)707 self.assertEqual(self.video.message('status'), 'No Timed Transcript')708 self.open_advanced_tab()709 self.video.set_field_value('Default Timed Transcript', 't_not_exist')710 self.open_basic_tab()711 self.assertEqual(self.video.message('status'), 'Timed Transcript Found')712 self.save_unit_settings()713 self.assertTrue(self.video.is_captions_visible())714 self.edit_component()715 self.assertEqual(self.video.message('status'), 'Timed Transcript Found')716 self.assertTrue(self.video.verify_field_value('Default Timed Transcript', 'video_name_1'))717 def test_clearing_transcripts_wo_save(self):718 """719 Scenario: After clearing Transcripts field in the Advanced tab "not found" message should be visible w/o saving720 Given I have created a Video component721 After I enter a "t_not_exist.mp4" source to field number 1 I should see status message "No Timed Transcript"722 After uploading transcripts "chinese_transcripts.srt" I see message "Timed Transcript Uploaded Successfully"723 Open tab "Advanced" and set value "" to the field "Default Timed Transcript"724 When I open tab "Basic" I see status message "No Timed Transcript"725 After saving the changes video captions should not be visible726 When I edit the component I should see status message "No Timed Transcript"727 And I see value "" in the field "Default Timed Transcript"728 """729 self._create_video_component()730 self.edit_component()731 self.video.set_url_field('t_not_exist.mp4', 1)732 self.assertEqual(self.video.message('status'), 'No Timed Transcript')733 self.video.upload_transcript('chinese_transcripts.srt')734 self.assertEqual(self.video.message('status'), 'Timed Transcript Uploaded Successfully')735 self.open_advanced_tab()736 self.video.set_field_value('Default Timed Transcript', '')737 self.open_basic_tab()738 self.assertEqual(self.video.message('status'), 'No Timed Transcript')739 self.save_unit_settings()740 self.assertFalse(self.video.is_captions_visible())741 self.edit_component()742 self.assertEqual(self.video.message('status'), 'No Timed Transcript')743 self.assertTrue(self.video.verify_field_value('Default Timed Transcript', ''))744 def test_clearing_transcripts_w_save(self):745 """746 Scenario: After clearing Transcripts field in the Advanced tab "not found" message should be visible with saving747 Given I have created a Video component748 After I enter a "t_not_exist.mp4" source to field number 1 I see status message "No Timed Transcript"749 After uploading the transcripts "chinese_transcripts.srt" I see message "Timed Transcript Uploaded Successfully"750 After saving changes I see "好 各位同学" text in the captions751 And I edit the component752 Open tab "Advanced" I set value "" to the field "Default Timed Transcript"753 When I open tab "Basic" I see status message "No Timed Transcript"754 After saving the changes video captions should not be visible755 After I edit the component I should see status message "No Timed Transcript"756 And I see value "" in the field "Default Timed Transcript"757 """758 self._create_video_component()759 self.edit_component()760 self.video.set_url_field('t_not_exist.mp4', 1)761 self.assertEqual(self.video.message('status'), 'No Timed Transcript')762 self.video.upload_transcript('chinese_transcripts.srt')763 self.assertEqual(self.video.message('status'), 'Timed Transcript Uploaded Successfully')764 self.save_unit_settings()765 unicode_text = "好 各位同学".decode('utf-8')766 self.assertIn(unicode_text, self.video.captions_text)767 self.edit_component()768 self.open_advanced_tab()769 self.video.set_field_value('Default Timed Transcript', '')770 self.open_basic_tab()771 self.assertEqual(self.video.message('status'), 'No Timed Transcript')772 self.save_unit_settings()773 self.assertFalse(self.video.is_captions_visible())774 self.edit_component()775 self.assertEqual(self.video.message('status'), 'No Timed Transcript')776 self.assertTrue(self.video.verify_field_value('Default Timed Transcript', ''))777 def test_video_w_existing_subtitles(self):778 """779 Scenario: Video with existing subs - Advanced tab - change to another one subs -780 Basic tab - Found message - Save - see correct subs781 Given I have created a Video component with subtitles "t_not_exist"782 After I enter a "video_name_1.mp4" source to field number 1 I see status message "No Timed Transcript"783 After uploading the transcripts "chinese_transcripts.srt" I see message "Timed Transcript Uploaded Successfully"784 After saving the changes video captions should be visible785 And I see "好 各位同学" text in the captions786 And I edit the component787 Open tab "Advanced" And set value "t_not_exist" to the field "Default Timed Transcript"788 When I open tab "Basic" I should see status message "Timed Transcript Found"789 After saving the changes video captions should be visible790 And I see "LILA FISHER: Hi, welcome to Edx." text in the captions791 """792 self._create_video_component(subtitles=True, subtitle_id='t_not_exist')793 self.edit_component()794 self.video.set_url_field('video_name_1.mp4', 1)795 self.assertEqual(self.video.message('status'), 'No Timed Transcript')796 self.video.upload_transcript('chinese_transcripts.srt')797 self.assertEqual(self.video.message('status'), 'Timed Transcript Uploaded Successfully')798 self.save_unit_settings()799 self.assertTrue(self.video.is_captions_visible())800 unicode_text = "好 各位同学".decode('utf-8')801 self.assertIn(unicode_text, self.video.captions_text)802 self.edit_component()803 self.open_advanced_tab()804 self.video.set_field_value('Default Timed Transcript', 't_not_exist')805 self.open_basic_tab()806 self.assertEqual(self.video.message('status'), 'Timed Transcript Found')807 self.save_unit_settings()808 self.assertTrue(self.video.is_captions_visible())809 self.assertIn('LILA FISHER: Hi, welcome to Edx.', self.video.captions_text)810 def test_reverting_transcripts(self):811 """812 Scenario: After reverting Transcripts field in the Advanced tab "not found" message should be visible813 Given I have created a Video component814 After I enter a "t_not_exist.mp4" source to field number 1 Then I see status message "No Timed Transcript"815 After uploading transcripts "chinese_transcripts.srt" I see message "Timed Transcript Uploaded Successfully"816 After saving the changes I should see "好 各位同学" text in the captions817 After I edit the component I open tab "Advanced"818 And I revert the transcript field "Default Timed Transcript"819 After saving the changes video captions should not be visible820 After I edit the component I should see status message "No Timed Transcript"821 """822 self._create_video_component()823 self.edit_component()824 self.video.set_url_field('t_not_exist.mp4', 1)825 self.assertEqual(self.video.message('status'), 'No Timed Transcript')826 self.video.upload_transcript('chinese_transcripts.srt')827 self.assertEqual(self.video.message('status'), 'Timed Transcript Uploaded Successfully')828 self.save_unit_settings()829 unicode_text = "好 各位同学".decode('utf-8')830 self.assertIn(unicode_text, self.video.captions_text)831 self.edit_component()832 self.open_advanced_tab()833 self.video.revert_field('Default Timed Transcript')834 self.save_unit_settings()835 self.assertFalse(self.video.is_captions_visible())836 self.edit_component()837 self.assertEqual(self.video.message('status'), 'No Timed Transcript')838 def test_upload_subtitles_w_different_names2(self):839 """840 Scenario: File name and name of subs are different -- Uploading subtitles for file with periods841 in it should properly set the transcript name and keep the periods842 Given I have created a Video component843 After I enter a "video_name_1.1.2.mp4" source to field number 1, I see status message "No Timed Transcript"844 After I upload the transcripts file "uk_transcripts.srt" I see message "Timed Transcript Uploaded Successfully"845 And I see value "video_name_1.1.2" in the field "Default Timed Transcript"846 After saving the changes video captions should be visible847 After I edit the component I should see status message "Timed Transcript Found"848 """849 self._create_video_component()850 self.edit_component()851 self.video.set_url_field('video_name_1.1.2.mp4', 1)852 self.assertEqual(self.video.message('status'), 'No Timed Transcript')853 self.video.upload_transcript('uk_transcripts.srt')854 self.assertEqual(self.video.message('status'), 'Timed Transcript Uploaded Successfully')855 self.open_advanced_tab()856 self.assertTrue(self.video.verify_field_value('Default Timed Transcript', 'video_name_1.1.2'))857 self.save_unit_settings()858 self.assertTrue(self.video.is_captions_visible())859 self.edit_component()860 self.assertEqual(self.video.message('status'), 'Timed Transcript Found')861 def test_upload_subtitles_w_different_names3(self):862 """863 Scenario: Shortened link: File name and name of subs are different864 Given I have created a Video component865 After I enter a "http://goo.gl/pxxZrg" source to field number 1 Then I see status message "No Timed Transcript"866 After I upload the transcripts file "uk_transcripts.srt" I see message "Timed Transcript Uploaded Successfully"867 And I see value "pxxZrg" in the field "Default Timed Transcript"868 After saving the changes video captions should be visible869 After I edit the component I should see status message "Timed Transcript Found"870 """871 self._create_video_component()872 self.edit_component()873 self.video.set_url_field('http://goo.gl/pxxZrg', 1)874 self.assertEqual(self.video.message('status'), 'No Timed Transcript')875 self.video.upload_transcript('uk_transcripts.srt')876 self.assertEqual(self.video.message('status'), 'Timed Transcript Uploaded Successfully')877 self.open_advanced_tab()878 self.assertTrue(self.video.verify_field_value('Default Timed Transcript', 'pxxZrg'))879 self.save_unit_settings()880 self.assertTrue(self.video.is_captions_visible())881 self.edit_component()882 self.assertEqual(self.video.message('status'), 'Timed Transcript Found')883 def test_upload_subtitles_w_different_names4(self):884 """885 Scenario: Relative link: File name and name of subs are different886 Given I have created a Video component887 After i enter a "/gizmo.webm" source to field number 1 Then I see status message "No Timed Transcript"888 After I upload the transcripts file "uk_transcripts.srt" I see message "Timed Transcript Uploaded Successfully"889 And I see value "gizmo" in the field "Default Timed Transcript"890 After saving the changes video captions should be visible891 After I edit the component I should see status message "Timed Transcript Found"892 """893 self._create_video_component()894 self.edit_component()895 self.video.set_url_field('/gizmo.webm', 1)896 self.assertEqual(self.video.message('status'), 'No Timed Transcript')897 self.video.upload_transcript('uk_transcripts.srt')898 self.assertEqual(self.video.message('status'), 'Timed Transcript Uploaded Successfully')899 self.open_advanced_tab()900 self.assertTrue(self.video.verify_field_value('Default Timed Transcript', 'gizmo'))901 self.save_unit_settings()902 self.assertTrue(self.video.is_captions_visible())903 self.edit_component()...

Full Screen

Full Screen

cython_special.pyi

Source:cython_special.pyi Github

copy

Full Screen

1# Python: 3.8.2 (tags/v3.8.2:7b3ab59, Feb 25 2020, 23:03:10) [MSC v.1916 64 bit (AMD64)]2# Library: scipy, version: 1.6.23# Module: scipy.special.cython_special, version: unspecified4import typing5import builtins as _mod_builtins6__doc__: str7__file__: str8__name__: str9__package__: str10__pyx_capi__: dict11__test__: dict12def _airy_pywrap(x0) -> typing.Any:13 ...14def _airye_pywrap(x0) -> typing.Any:15 ...16def _bench_airy_D_cy() -> typing.Any:17 ...18def _bench_airy_D_py() -> typing.Any:19 ...20def _bench_airy_d_cy() -> typing.Any:21 ...22def _bench_airy_d_py() -> typing.Any:23 ...24def _bench_beta_dd_cy() -> typing.Any:25 ...26def _bench_beta_dd_py() -> typing.Any:27 ...28def _bench_erf_D_cy() -> typing.Any:29 ...30def _bench_erf_D_py() -> typing.Any:31 ...32def _bench_erf_d_cy() -> typing.Any:33 ...34def _bench_erf_d_py() -> typing.Any:35 ...36def _bench_exprel_d_cy() -> typing.Any:37 ...38def _bench_exprel_d_py() -> typing.Any:39 ...40def _bench_gamma_D_cy() -> typing.Any:41 ...42def _bench_gamma_D_py() -> typing.Any:43 ...44def _bench_gamma_d_cy() -> typing.Any:45 ...46def _bench_gamma_d_py() -> typing.Any:47 ...48def _bench_jv_dD_cy() -> typing.Any:49 ...50def _bench_jv_dD_py() -> typing.Any:51 ...52def _bench_jv_dd_cy() -> typing.Any:53 ...54def _bench_jv_dd_py() -> typing.Any:55 ...56def _bench_loggamma_D_cy() -> typing.Any:57 ...58def _bench_loggamma_D_py() -> typing.Any:59 ...60def _bench_logit_d_cy() -> typing.Any:61 ...62def _bench_logit_d_py() -> typing.Any:63 ...64def _bench_psi_D_cy() -> typing.Any:65 ...66def _bench_psi_D_py() -> typing.Any:67 ...68def _bench_psi_d_cy() -> typing.Any:69 ...70def _bench_psi_d_py() -> typing.Any:71 ...72def _ellipj_pywrap() -> typing.Any:73 ...74def _fresnel_pywrap(x0) -> typing.Any:75 ...76def _it2i0k0_pywrap() -> typing.Any:77 ...78def _it2j0y0_pywrap() -> typing.Any:79 ...80def _itairy_pywrap() -> typing.Any:81 ...82def _iti0k0_pywrap() -> typing.Any:83 ...84def _itj0y0_pywrap() -> typing.Any:85 ...86def _kelvin_pywrap() -> typing.Any:87 ...88def _mathieu_cem_pywrap() -> typing.Any:89 ...90def _mathieu_modcem1_pywrap() -> typing.Any:91 ...92def _mathieu_modcem2_pywrap() -> typing.Any:93 ...94def _mathieu_modsem1_pywrap() -> typing.Any:95 ...96def _mathieu_modsem2_pywrap() -> typing.Any:97 ...98def _mathieu_sem_pywrap() -> typing.Any:99 ...100def _modfresnelm_pywrap() -> typing.Any:101 ...102def _modfresnelp_pywrap() -> typing.Any:103 ...104def _obl_ang1_cv_pywrap() -> typing.Any:105 ...106def _obl_ang1_pywrap() -> typing.Any:107 ...108def _obl_rad1_cv_pywrap() -> typing.Any:109 ...110def _obl_rad1_pywrap() -> typing.Any:111 ...112def _obl_rad2_cv_pywrap() -> typing.Any:113 ...114def _obl_rad2_pywrap() -> typing.Any:115 ...116def _pbdv_pywrap() -> typing.Any:117 ...118def _pbvv_pywrap() -> typing.Any:119 ...120def _pbwa_pywrap() -> typing.Any:121 ...122def _pro_ang1_cv_pywrap() -> typing.Any:123 ...124def _pro_ang1_pywrap() -> typing.Any:125 ...126def _pro_rad1_cv_pywrap() -> typing.Any:127 ...128def _pro_rad1_pywrap() -> typing.Any:129 ...130def _pro_rad2_cv_pywrap() -> typing.Any:131 ...132def _pro_rad2_pywrap() -> typing.Any:133 ...134def _shichi_pywrap(x0) -> typing.Any:135 ...136def _sici_pywrap(x0) -> typing.Any:137 ...138def agm() -> typing.Any:139 'See the documentation for scipy.special.agm'140 ...141def bdtr(x0, x1, x2) -> typing.Any:142 'See the documentation for scipy.special.bdtr'143 ...144def bdtrc(x0, x1, x2) -> typing.Any:145 'See the documentation for scipy.special.bdtrc'146 ...147def bdtri(x0, x1, x2) -> typing.Any:148 'See the documentation for scipy.special.bdtri'149 ...150def bdtrik() -> typing.Any:151 'See the documentation for scipy.special.bdtrik'152 ...153def bdtrin() -> typing.Any:154 'See the documentation for scipy.special.bdtrin'155 ...156def bei() -> typing.Any:157 'See the documentation for scipy.special.bei'158 ...159def beip() -> typing.Any:160 'See the documentation for scipy.special.beip'161 ...162def ber() -> typing.Any:163 'See the documentation for scipy.special.ber'164 ...165def berp() -> typing.Any:166 'See the documentation for scipy.special.berp'167 ...168def besselpoly() -> typing.Any:169 'See the documentation for scipy.special.besselpoly'170 ...171def beta() -> typing.Any:172 'See the documentation for scipy.special.beta'173 ...174def betainc() -> typing.Any:175 'See the documentation for scipy.special.betainc'176 ...177def betaincinv() -> typing.Any:178 'See the documentation for scipy.special.betaincinv'179 ...180def betaln() -> typing.Any:181 'See the documentation for scipy.special.betaln'182 ...183def binom() -> typing.Any:184 'See the documentation for scipy.special.binom'185 ...186def boxcox() -> typing.Any:187 'See the documentation for scipy.special.boxcox'188 ...189def boxcox1p() -> typing.Any:190 'See the documentation for scipy.special.boxcox1p'191 ...192def btdtr() -> typing.Any:193 'See the documentation for scipy.special.btdtr'194 ...195def btdtri() -> typing.Any:196 'See the documentation for scipy.special.btdtri'197 ...198def btdtria() -> typing.Any:199 'See the documentation for scipy.special.btdtria'200 ...201def btdtrib() -> typing.Any:202 'See the documentation for scipy.special.btdtrib'203 ...204def cbrt() -> typing.Any:205 'See the documentation for scipy.special.cbrt'206 ...207def chdtr() -> typing.Any:208 'See the documentation for scipy.special.chdtr'209 ...210def chdtrc() -> typing.Any:211 'See the documentation for scipy.special.chdtrc'212 ...213def chdtri() -> typing.Any:214 'See the documentation for scipy.special.chdtri'215 ...216def chdtriv() -> typing.Any:217 'See the documentation for scipy.special.chdtriv'218 ...219def chndtr() -> typing.Any:220 'See the documentation for scipy.special.chndtr'221 ...222def chndtridf() -> typing.Any:223 'See the documentation for scipy.special.chndtridf'224 ...225def chndtrinc() -> typing.Any:226 'See the documentation for scipy.special.chndtrinc'227 ...228def chndtrix() -> typing.Any:229 'See the documentation for scipy.special.chndtrix'230 ...231def cosdg() -> typing.Any:232 'See the documentation for scipy.special.cosdg'233 ...234def cosm1() -> typing.Any:235 'See the documentation for scipy.special.cosm1'236 ...237def cotdg() -> typing.Any:238 'See the documentation for scipy.special.cotdg'239 ...240def dawsn(x0) -> typing.Any:241 'See the documentation for scipy.special.dawsn'242 ...243def ellipe() -> typing.Any:244 'See the documentation for scipy.special.ellipe'245 ...246def ellipeinc() -> typing.Any:247 'See the documentation for scipy.special.ellipeinc'248 ...249def ellipk() -> typing.Any:250 'See the documentation for scipy.special.ellipk'251 ...252def ellipkinc() -> typing.Any:253 'See the documentation for scipy.special.ellipkinc'254 ...255def ellipkm1() -> typing.Any:256 'See the documentation for scipy.special.ellipkm1'257 ...258def entr() -> typing.Any:259 'See the documentation for scipy.special.entr'260 ...261def erf(x0) -> typing.Any:262 'See the documentation for scipy.special.erf'263 ...264def erfc(x0) -> typing.Any:265 'See the documentation for scipy.special.erfc'266 ...267def erfcinv() -> typing.Any:268 'See the documentation for scipy.special.erfcinv'269 ...270def erfcx(x0) -> typing.Any:271 'See the documentation for scipy.special.erfcx'272 ...273def erfi(x0) -> typing.Any:274 'See the documentation for scipy.special.erfi'275 ...276def erfinv() -> typing.Any:277 'See the documentation for scipy.special.erfinv'278 ...279def eval_chebyc(x0, x1) -> typing.Any:280 'See the documentation for scipy.special.eval_chebyc'281 ...282def eval_chebys(x0, x1) -> typing.Any:283 'See the documentation for scipy.special.eval_chebys'284 ...285def eval_chebyt(x0, x1) -> typing.Any:286 'See the documentation for scipy.special.eval_chebyt'287 ...288def eval_chebyu(x0, x1) -> typing.Any:289 'See the documentation for scipy.special.eval_chebyu'290 ...291def eval_gegenbauer(x0, x1, x2) -> typing.Any:292 'See the documentation for scipy.special.eval_gegenbauer'293 ...294def eval_genlaguerre(x0, x1, x2) -> typing.Any:295 'See the documentation for scipy.special.eval_genlaguerre'296 ...297def eval_hermite() -> typing.Any:298 'See the documentation for scipy.special.eval_hermite'299 ...300def eval_hermitenorm() -> typing.Any:301 'See the documentation for scipy.special.eval_hermitenorm'302 ...303def eval_jacobi(x0, x1, x2, x3) -> typing.Any:304 'See the documentation for scipy.special.eval_jacobi'305 ...306def eval_laguerre(x0, x1) -> typing.Any:307 'See the documentation for scipy.special.eval_laguerre'308 ...309def eval_legendre(x0, x1) -> typing.Any:310 'See the documentation for scipy.special.eval_legendre'311 ...312def eval_sh_chebyt(x0, x1) -> typing.Any:313 'See the documentation for scipy.special.eval_sh_chebyt'314 ...315def eval_sh_chebyu(x0, x1) -> typing.Any:316 'See the documentation for scipy.special.eval_sh_chebyu'317 ...318def eval_sh_jacobi(x0, x1, x2, x3) -> typing.Any:319 'See the documentation for scipy.special.eval_sh_jacobi'320 ...321def eval_sh_legendre(x0, x1) -> typing.Any:322 'See the documentation for scipy.special.eval_sh_legendre'323 ...324def exp1(x0) -> typing.Any:325 'See the documentation for scipy.special.exp1'326 ...327def exp10() -> typing.Any:328 'See the documentation for scipy.special.exp10'329 ...330def exp2() -> typing.Any:331 'See the documentation for scipy.special.exp2'332 ...333def expi(x0) -> typing.Any:334 'See the documentation for scipy.special.expi'335 ...336def expit(x0) -> typing.Any:337 'See the documentation for scipy.special.expit'338 ...339def expm1(x0) -> typing.Any:340 'See the documentation for scipy.special.expm1'341 ...342def expn(x0, x1) -> typing.Any:343 'See the documentation for scipy.special.expn'344 ...345def exprel() -> typing.Any:346 'See the documentation for scipy.special.exprel'347 ...348def fdtr() -> typing.Any:349 'See the documentation for scipy.special.fdtr'350 ...351def fdtrc() -> typing.Any:352 'See the documentation for scipy.special.fdtrc'353 ...354def fdtri() -> typing.Any:355 'See the documentation for scipy.special.fdtri'356 ...357def fdtridfd() -> typing.Any:358 'See the documentation for scipy.special.fdtridfd'359 ...360def gamma(x0) -> typing.Any:361 'See the documentation for scipy.special.gamma'362 ...363def gammainc() -> typing.Any:364 'See the documentation for scipy.special.gammainc'365 ...366def gammaincc() -> typing.Any:367 'See the documentation for scipy.special.gammaincc'368 ...369def gammainccinv() -> typing.Any:370 'See the documentation for scipy.special.gammainccinv'371 ...372def gammaincinv() -> typing.Any:373 'See the documentation for scipy.special.gammaincinv'374 ...375def gammaln() -> typing.Any:376 'See the documentation for scipy.special.gammaln'377 ...378def gammasgn() -> typing.Any:379 'See the documentation for scipy.special.gammasgn'380 ...381def gdtr() -> typing.Any:382 'See the documentation for scipy.special.gdtr'383 ...384def gdtrc() -> typing.Any:385 'See the documentation for scipy.special.gdtrc'386 ...387def gdtria() -> typing.Any:388 'See the documentation for scipy.special.gdtria'389 ...390def gdtrib() -> typing.Any:391 'See the documentation for scipy.special.gdtrib'392 ...393def gdtrix() -> typing.Any:394 'See the documentation for scipy.special.gdtrix'395 ...396def hankel1() -> typing.Any:397 'See the documentation for scipy.special.hankel1'398 ...399def hankel1e() -> typing.Any:400 'See the documentation for scipy.special.hankel1e'401 ...402def hankel2() -> typing.Any:403 'See the documentation for scipy.special.hankel2'404 ...405def hankel2e() -> typing.Any:406 'See the documentation for scipy.special.hankel2e'407 ...408def huber() -> typing.Any:409 'See the documentation for scipy.special.huber'410 ...411def hyp0f1(x0, x1) -> typing.Any:412 'See the documentation for scipy.special.hyp0f1'413 ...414def hyp1f1(x0, x1, x2) -> typing.Any:415 'See the documentation for scipy.special.hyp1f1'416 ...417def hyp2f1(x0, x1, x2, x3) -> typing.Any:418 'See the documentation for scipy.special.hyp2f1'419 ...420def hyperu() -> typing.Any:421 'See the documentation for scipy.special.hyperu'422 ...423def i0() -> typing.Any:424 'See the documentation for scipy.special.i0'425 ...426def i0e() -> typing.Any:427 'See the documentation for scipy.special.i0e'428 ...429def i1() -> typing.Any:430 'See the documentation for scipy.special.i1'431 ...432def i1e() -> typing.Any:433 'See the documentation for scipy.special.i1e'434 ...435def inv_boxcox() -> typing.Any:436 'See the documentation for scipy.special.inv_boxcox'437 ...438def inv_boxcox1p() -> typing.Any:439 'See the documentation for scipy.special.inv_boxcox1p'440 ...441def it2struve0() -> typing.Any:442 'See the documentation for scipy.special.it2struve0'443 ...444def itmodstruve0() -> typing.Any:445 'See the documentation for scipy.special.itmodstruve0'446 ...447def itstruve0() -> typing.Any:448 'See the documentation for scipy.special.itstruve0'449 ...450def iv(x0, x1) -> typing.Any:451 'See the documentation for scipy.special.iv'452 ...453def ive(x0, x1) -> typing.Any:454 'See the documentation for scipy.special.ive'455 ...456def j0() -> typing.Any:457 'See the documentation for scipy.special.j0'458 ...459def j1() -> typing.Any:460 'See the documentation for scipy.special.j1'461 ...462def jv(x0, x1) -> typing.Any:463 'See the documentation for scipy.special.jv'464 ...465def jve(x0, x1) -> typing.Any:466 'See the documentation for scipy.special.jve'467 ...468def k0() -> typing.Any:469 'See the documentation for scipy.special.k0'470 ...471def k0e() -> typing.Any:472 'See the documentation for scipy.special.k0e'473 ...474def k1() -> typing.Any:475 'See the documentation for scipy.special.k1'476 ...477def k1e() -> typing.Any:478 'See the documentation for scipy.special.k1e'479 ...480def kei() -> typing.Any:481 'See the documentation for scipy.special.kei'482 ...483def keip() -> typing.Any:484 'See the documentation for scipy.special.keip'485 ...486def ker() -> typing.Any:487 'See the documentation for scipy.special.ker'488 ...489def kerp() -> typing.Any:490 'See the documentation for scipy.special.kerp'491 ...492def kl_div() -> typing.Any:493 'See the documentation for scipy.special.kl_div'494 ...495def kn(x0, x1) -> typing.Any:496 'See the documentation for scipy.special.kn'497 ...498def kolmogi() -> typing.Any:499 'See the documentation for scipy.special.kolmogi'500 ...501def kolmogorov() -> typing.Any:502 'See the documentation for scipy.special.kolmogorov'503 ...504def kv(x0, x1) -> typing.Any:505 'See the documentation for scipy.special.kv'506 ...507def kve(x0, x1) -> typing.Any:508 'See the documentation for scipy.special.kve'509 ...510def log1p(x0) -> typing.Any:511 'See the documentation for scipy.special.log1p'512 ...513def log_ndtr(x0) -> typing.Any:514 'See the documentation for scipy.special.log_ndtr'515 ...516def loggamma(x0) -> typing.Any:517 'See the documentation for scipy.special.loggamma'518 ...519def logit(x0) -> typing.Any:520 'See the documentation for scipy.special.logit'521 ...522def lpmv() -> typing.Any:523 'See the documentation for scipy.special.lpmv'524 ...525def mathieu_a() -> typing.Any:526 'See the documentation for scipy.special.mathieu_a'527 ...528def mathieu_b() -> typing.Any:529 'See the documentation for scipy.special.mathieu_b'530 ...531def modstruve() -> typing.Any:532 'See the documentation for scipy.special.modstruve'533 ...534def nbdtr(x0, x1, x2) -> typing.Any:535 'See the documentation for scipy.special.nbdtr'536 ...537def nbdtrc(x0, x1, x2) -> typing.Any:538 'See the documentation for scipy.special.nbdtrc'539 ...540def nbdtri(x0, x1, x2) -> typing.Any:541 'See the documentation for scipy.special.nbdtri'542 ...543def nbdtrik() -> typing.Any:544 'See the documentation for scipy.special.nbdtrik'545 ...546def nbdtrin() -> typing.Any:547 'See the documentation for scipy.special.nbdtrin'548 ...549def ncfdtr() -> typing.Any:550 'See the documentation for scipy.special.ncfdtr'551 ...552def ncfdtri() -> typing.Any:553 'See the documentation for scipy.special.ncfdtri'554 ...555def ncfdtridfd() -> typing.Any:556 'See the documentation for scipy.special.ncfdtridfd'557 ...558def ncfdtridfn() -> typing.Any:559 'See the documentation for scipy.special.ncfdtridfn'560 ...561def ncfdtrinc() -> typing.Any:562 'See the documentation for scipy.special.ncfdtrinc'563 ...564def nctdtr() -> typing.Any:565 'See the documentation for scipy.special.nctdtr'566 ...567def nctdtridf() -> typing.Any:568 'See the documentation for scipy.special.nctdtridf'569 ...570def nctdtrinc() -> typing.Any:571 'See the documentation for scipy.special.nctdtrinc'572 ...573def nctdtrit() -> typing.Any:574 'See the documentation for scipy.special.nctdtrit'575 ...576def ndtr(x0) -> typing.Any:577 'See the documentation for scipy.special.ndtr'578 ...579def ndtri() -> typing.Any:580 'See the documentation for scipy.special.ndtri'581 ...582def nrdtrimn() -> typing.Any:583 'See the documentation for scipy.special.nrdtrimn'584 ...585def nrdtrisd() -> typing.Any:586 'See the documentation for scipy.special.nrdtrisd'587 ...588def obl_cv() -> typing.Any:589 'See the documentation for scipy.special.obl_cv'590 ...591def owens_t() -> typing.Any:592 'See the documentation for scipy.special.owens_t'593 ...594def pdtr() -> typing.Any:595 'See the documentation for scipy.special.pdtr'596 ...597def pdtrc() -> typing.Any:598 'See the documentation for scipy.special.pdtrc'599 ...600def pdtri(x0, x1) -> typing.Any:601 'See the documentation for scipy.special.pdtri'602 ...603def pdtrik() -> typing.Any:604 'See the documentation for scipy.special.pdtrik'605 ...606def poch() -> typing.Any:607 'See the documentation for scipy.special.poch'608 ...609def pro_cv() -> typing.Any:610 'See the documentation for scipy.special.pro_cv'611 ...612def pseudo_huber() -> typing.Any:613 'See the documentation for scipy.special.pseudo_huber'614 ...615def psi(x0) -> typing.Any:616 'See the documentation for scipy.special.psi'617 ...618def radian() -> typing.Any:619 'See the documentation for scipy.special.radian'620 ...621def rel_entr() -> typing.Any:622 'See the documentation for scipy.special.rel_entr'623 ...624def rgamma(x0) -> typing.Any:625 'See the documentation for scipy.special.rgamma'626 ...627def round() -> typing.Any:628 'See the documentation for scipy.special.round'629 ...630def sindg() -> typing.Any:631 'See the documentation for scipy.special.sindg'632 ...633def smirnov(x0, x1) -> typing.Any:634 'See the documentation for scipy.special.smirnov'635 ...636def smirnovi(x0, x1) -> typing.Any:637 'See the documentation for scipy.special.smirnovi'638 ...639def spence(x0) -> typing.Any:640 'See the documentation for scipy.special.spence'641 ...642def sph_harm(x0, x1, x2, x3) -> typing.Any:643 'See the documentation for scipy.special.sph_harm'644 ...645def spherical_in() -> typing.Any:646 'See the documentation for scipy.special.spherical_in'647 ...648def spherical_jn() -> typing.Any:649 'See the documentation for scipy.special.spherical_jn'650 ...651def spherical_kn() -> typing.Any:652 'See the documentation for scipy.special.spherical_kn'653 ...654def spherical_yn() -> typing.Any:655 'See the documentation for scipy.special.spherical_yn'656 ...657def stdtr() -> typing.Any:658 'See the documentation for scipy.special.stdtr'659 ...660def stdtridf() -> typing.Any:661 'See the documentation for scipy.special.stdtridf'662 ...663def stdtrit() -> typing.Any:664 'See the documentation for scipy.special.stdtrit'665 ...666def struve() -> typing.Any:667 'See the documentation for scipy.special.struve'668 ...669def tandg() -> typing.Any:670 'See the documentation for scipy.special.tandg'671 ...672def tklmbda() -> typing.Any:673 'See the documentation for scipy.special.tklmbda'674 ...675def voigt_profile() -> typing.Any:676 'See the documentation for scipy.special.voigt_profile'677 ...678def wofz() -> typing.Any:679 'See the documentation for scipy.special.wofz'680 ...681def wrightomega(x0) -> typing.Any:682 'See the documentation for scipy.special.wrightomega'683 ...684def xlog1py(x0, x1) -> typing.Any:685 'See the documentation for scipy.special.xlog1py'686 ...687def xlogy(x0, x1) -> typing.Any:688 'See the documentation for scipy.special.xlogy'689 ...690def y0() -> typing.Any:691 'See the documentation for scipy.special.y0'692 ...693def y1() -> typing.Any:694 'See the documentation for scipy.special.y1'695 ...696def yn(x0, x1) -> typing.Any:697 'See the documentation for scipy.special.yn'698 ...699def yv(x0, x1) -> typing.Any:700 'See the documentation for scipy.special.yv'701 ...702def yve(x0, x1) -> typing.Any:703 'See the documentation for scipy.special.yve'704 ...705def zetac() -> typing.Any:706 'See the documentation for scipy.special.zetac'707 ...708def __getattr__(name) -> typing.Any:...

Full Screen

Full Screen

settings.py

Source:settings.py Github

copy

Full Screen

1# -*- coding: utf-8 -*-2"""3Django settings for django-play-1 project.4For more information on this file, see5https://docs.djangoproject.com/en/dev/topics/settings/6For the full list of settings and their values, see7https://docs.djangoproject.com/en/dev/ref/settings/8"""9# Build paths inside the project like this: os.path.join(BASE_DIR, ...)10import os11from os.path import join12# See: http://django-storages.readthedocs.org/en/latest/backends/amazon-S3.html#settings13try:14 from S3 import CallingFormat15 AWS_CALLING_FORMAT = CallingFormat.SUBDOMAIN16except ImportError:17 # TODO: Fix this where even if in Dev this class is called.18 pass19from configurations import Configuration, values20BASE_DIR = os.path.dirname(os.path.dirname(__file__))21class Common(Configuration):22 ########## APP CONFIGURATION23 DJANGO_APPS = (24 # Default Django apps:25 'django.contrib.auth',26 'django.contrib.contenttypes',27 'django.contrib.sessions',28 'django.contrib.sites',29 'django.contrib.messages',30 'django.contrib.staticfiles',31 # Useful template tags:32 # 'django.contrib.humanize',33 # Admin34 'django.contrib.admin',35 )36 THIRD_PARTY_APPS = (37 'south', # Database migration helpers:38 'crispy_forms', # Form layouts39 'avatar', # for user avatars40 )41 # Apps specific for this project go here.42 LOCAL_APPS = (43 'users', # custom users app44 # Your stuff: custom apps go here45 )46 # See: https://docs.djangoproject.com/en/dev/ref/settings/#installed-apps47 INSTALLED_APPS = DJANGO_APPS + THIRD_PARTY_APPS + LOCAL_APPS48 INSTALLED_APPS += (49 # Needs to come last for now because of a weird edge case between50 # South and allauth51 'allauth', # registration52 'allauth.account', # registration53 'allauth.socialaccount', # registration54 )55 ########## END APP CONFIGURATION56 ########## MIDDLEWARE CONFIGURATION57 MIDDLEWARE_CLASSES = (58 'django.contrib.sessions.middleware.SessionMiddleware',59 'django.middleware.common.CommonMiddleware',60 'django.middleware.csrf.CsrfViewMiddleware',61 'django.contrib.auth.middleware.AuthenticationMiddleware',62 'django.contrib.messages.middleware.MessageMiddleware',63 'django.middleware.clickjacking.XFrameOptionsMiddleware',64 )65 ########## END MIDDLEWARE CONFIGURATION66 ########## DEBUG67 # See: https://docs.djangoproject.com/en/dev/ref/settings/#debug68 DEBUG = values.BooleanValue(True)69 # See: https://docs.djangoproject.com/en/dev/ref/settings/#template-debug70 TEMPLATE_DEBUG = DEBUG71 ########## END DEBUG72 ########## SECRET CONFIGURATION73 # See: https://docs.djangoproject.com/en/dev/ref/settings/#secret-key74 # Note: This key only used for development and testing.75 # In production, this is changed to a values.SecretValue() setting76 SECRET_KEY = "CHANGEME!!!"77 ########## END SECRET CONFIGURATION78 ########## FIXTURE CONFIGURATION79 # See: https://docs.djangoproject.com/en/dev/ref/settings/#std:setting-FIXTURE_DIRS80 FIXTURE_DIRS = (81 join(BASE_DIR, 'fixtures'),82 )83 ########## END FIXTURE CONFIGURATION84 85 ########## EMAIL CONFIGURATION86 EMAIL_BACKEND = values.Value('django.core.mail.backends.smtp.EmailBackend')87 ########## END EMAIL CONFIGURATION88 ########## MANAGER CONFIGURATION89 # See: https://docs.djangoproject.com/en/dev/ref/settings/#admins90 ADMINS = (91 ('Paulius Ruzgas', 'pauliusruzgas@gmail.com'),92 )93 # See: https://docs.djangoproject.com/en/dev/ref/settings/#managers94 MANAGERS = ADMINS95 ########## END MANAGER CONFIGURATION96 ########## DATABASE CONFIGURATION97 # See: https://docs.djangoproject.com/en/dev/ref/settings/#databases98 DATABASES = values.DatabaseURLValue('postgres://localhost/django-play-1')99 ########## END DATABASE CONFIGURATION100 ########## CACHING101 # Do this here because thanks to django-pylibmc-sasl and pylibmc memcacheify is painful to install on windows.102 # memcacheify is what's used in Production103 CACHES = {104 'default': {105 'BACKEND': 'django.core.cache.backends.locmem.LocMemCache',106 'LOCATION': ''107 }108 }109 ########## END CACHING110 ########## GENERAL CONFIGURATION111 # See: https://docs.djangoproject.com/en/dev/ref/settings/#time-zone112 TIME_ZONE = 'America/Los_Angeles'113 # See: https://docs.djangoproject.com/en/dev/ref/settings/#language-code114 LANGUAGE_CODE = 'en-us'115 # See: https://docs.djangoproject.com/en/dev/ref/settings/#site-id116 SITE_ID = 1117 # See: https://docs.djangoproject.com/en/dev/ref/settings/#use-i18n118 USE_I18N = True119 # See: https://docs.djangoproject.com/en/dev/ref/settings/#use-l10n120 USE_L10N = True121 # See: https://docs.djangoproject.com/en/dev/ref/settings/#use-tz122 USE_TZ = True123 ########## END GENERAL CONFIGURATION124 ########## TEMPLATE CONFIGURATION125 # See: https://docs.djangoproject.com/en/dev/ref/settings/#template-context-processors126 TEMPLATE_CONTEXT_PROCESSORS = (127 'django.contrib.auth.context_processors.auth',128 "allauth.account.context_processors.account",129 "allauth.socialaccount.context_processors.socialaccount",130 'django.core.context_processors.debug',131 'django.core.context_processors.i18n',132 'django.core.context_processors.media',133 'django.core.context_processors.static',134 'django.core.context_processors.tz',135 'django.contrib.messages.context_processors.messages',136 'django.core.context_processors.request',137 # Your stuff: custom template context processers go here138 )139 # See: https://docs.djangoproject.com/en/dev/ref/settings/#template-dirs140 TEMPLATE_DIRS = (141 join(BASE_DIR, 'templates'),142 )143 TEMPLATE_LOADERS = (144 'django.template.loaders.filesystem.Loader',145 'django.template.loaders.app_directories.Loader',146 )147 # See: http://django-crispy-forms.readthedocs.org/en/latest/install.html#template-packs148 CRISPY_TEMPLATE_PACK = 'bootstrap3'149 ########## END TEMPLATE CONFIGURATION150 ########## STATIC FILE CONFIGURATION151 # See: https://docs.djangoproject.com/en/dev/ref/settings/#static-root152 STATIC_ROOT = join(os.path.dirname(BASE_DIR), 'staticfiles')153 # See: https://docs.djangoproject.com/en/dev/ref/settings/#static-url154 STATIC_URL = '/static/'155 # See: https://docs.djangoproject.com/en/dev/ref/contrib/staticfiles/#std:setting-STATICFILES_DIRS156 STATICFILES_DIRS = (157 join(BASE_DIR, 'static'),158 )159 # See: https://docs.djangoproject.com/en/dev/ref/contrib/staticfiles/#staticfiles-finders160 STATICFILES_FINDERS = (161 'django.contrib.staticfiles.finders.FileSystemFinder',162 'django.contrib.staticfiles.finders.AppDirectoriesFinder',163 )164 ########## END STATIC FILE CONFIGURATION165 ########## MEDIA CONFIGURATION166 # See: https://docs.djangoproject.com/en/dev/ref/settings/#media-root167 MEDIA_ROOT = join(BASE_DIR, 'media')168 # See: https://docs.djangoproject.com/en/dev/ref/settings/#media-url169 MEDIA_URL = '/media/'170 ########## END MEDIA CONFIGURATION171 ########## URL Configuration172 ROOT_URLCONF = 'config.urls'173 # See: https://docs.djangoproject.com/en/dev/ref/settings/#wsgi-application174 WSGI_APPLICATION = 'config.wsgi.application'175 ########## End URL Configuration176 ########## AUTHENTICATION CONFIGURATION177 AUTHENTICATION_BACKENDS = (178 "django.contrib.auth.backends.ModelBackend",179 "allauth.account.auth_backends.AuthenticationBackend",180 )181 # Some really nice defaults182 ACCOUNT_AUTHENTICATION_METHOD = "username"183 ACCOUNT_EMAIL_REQUIRED = True184 ACCOUNT_EMAIL_VERIFICATION = "mandatory"185 ########## END AUTHENTICATION CONFIGURATION186 ########## Custom user app defaults187 # Select the correct user model188 AUTH_USER_MODEL = "users.User"189 LOGIN_REDIRECT_URL = "users:redirect"190 ########## END Custom user app defaults191 ########## SLUGLIFIER192 AUTOSLUG_SLUGIFY_FUNCTION = "slugify.slugify"193 ########## END SLUGLIFIER194 ########## LOGGING CONFIGURATION195 # See: https://docs.djangoproject.com/en/dev/ref/settings/#logging196 # A sample logging configuration. The only tangible logging197 # performed by this configuration is to send an email to198 # the site admins on every HTTP 500 error when DEBUG=False.199 # See http://docs.djangoproject.com/en/dev/topics/logging for200 # more details on how to customize your logging configuration.201 LOGGING = {202 'version': 1,203 'disable_existing_loggers': False,204 'filters': {205 'require_debug_false': {206 '()': 'django.utils.log.RequireDebugFalse'207 }208 },209 'handlers': {210 'mail_admins': {211 'level': 'ERROR',212 'filters': ['require_debug_false'],213 'class': 'django.utils.log.AdminEmailHandler'214 }215 },216 'loggers': {217 'django.request': {218 'handlers': ['mail_admins'],219 'level': 'ERROR',220 'propagate': True,221 },222 }223 }224 ########## END LOGGING CONFIGURATION225 ########## Your common stuff: Below this line define 3rd party libary settings226class Local(Common):227 ########## INSTALLED_APPS228 INSTALLED_APPS = Common.INSTALLED_APPS229 ########## END INSTALLED_APPS230 ########## Mail settings231 EMAIL_HOST = "localhost"232 EMAIL_PORT = 1025233 EMAIL_BACKEND = values.Value('django.core.mail.backends.console.EmailBackend')234 ########## End mail settings235 ########## django-debug-toolbar236 MIDDLEWARE_CLASSES = Common.MIDDLEWARE_CLASSES + ('debug_toolbar.middleware.DebugToolbarMiddleware',)237 INSTALLED_APPS += ('debug_toolbar',)238 INTERNAL_IPS = ('127.0.0.1',)239 DEBUG_TOOLBAR_CONFIG = {240 'INTERCEPT_REDIRECTS': False,241 'SHOW_TEMPLATE_CONTEXT': True,242 }243 ########## end django-debug-toolbar244 ########## Your local stuff: Below this line define 3rd party libary settings245class Production(Common):246 ########## INSTALLED_APPS247 INSTALLED_APPS = Common.INSTALLED_APPS248 ########## END INSTALLED_APPS249 ########## SECRET KEY250 SECRET_KEY = values.SecretValue()251 ########## END SECRET KEY252 ########## django-secure253 INSTALLED_APPS += ("djangosecure", )254 # set this to 60 seconds and then to 518400 when you can prove it works255 SECURE_HSTS_SECONDS = 60256 SECURE_HSTS_INCLUDE_SUBDOMAINS = values.BooleanValue(True)257 SECURE_FRAME_DENY = values.BooleanValue(True)258 SECURE_CONTENT_TYPE_NOSNIFF = values.BooleanValue(True)259 SECURE_BROWSER_XSS_FILTER = values.BooleanValue(True)260 SESSION_COOKIE_SECURE = values.BooleanValue(False)261 SESSION_COOKIE_HTTPONLY = values.BooleanValue(True)262 SECURE_SSL_REDIRECT = values.BooleanValue(True)263 ########## end django-secure264 ########## SITE CONFIGURATION265 # Hosts/domain names that are valid for this site266 # See https://docs.djangoproject.com/en/1.5/ref/settings/#allowed-hosts267 ALLOWED_HOSTS = ["*"]268 ########## END SITE CONFIGURATION269 INSTALLED_APPS += ("gunicorn", )270 ########## STORAGE CONFIGURATION271 # See: http://django-storages.readthedocs.org/en/latest/index.html272 INSTALLED_APPS += (273 'storages',274 )275 # See: http://django-storages.readthedocs.org/en/latest/backends/amazon-S3.html#settings276 STATICFILES_STORAGE = DEFAULT_FILE_STORAGE = 'storages.backends.s3boto.S3BotoStorage'277 # See: http://django-storages.readthedocs.org/en/latest/backends/amazon-S3.html#settings278 AWS_ACCESS_KEY_ID = values.SecretValue()279 AWS_SECRET_ACCESS_KEY = values.SecretValue()280 AWS_STORAGE_BUCKET_NAME = values.SecretValue()281 AWS_AUTO_CREATE_BUCKET = True282 AWS_QUERYSTRING_AUTH = False283 # AWS cache settings, don't change unless you know what you're doing:284 AWS_EXPIREY = 60 * 60 * 24 * 7285 AWS_HEADERS = {286 'Cache-Control': 'max-age=%d, s-maxage=%d, must-revalidate' % (AWS_EXPIREY,287 AWS_EXPIREY)288 }289 # See: https://docs.djangoproject.com/en/dev/ref/settings/#static-url290 STATIC_URL = 'https://s3.amazonaws.com/%s/' % AWS_STORAGE_BUCKET_NAME291 ########## END STORAGE CONFIGURATION292 ########## EMAIL293 DEFAULT_FROM_EMAIL = values.Value(294 'django-play-1 <django-play-1-noreply@example.com>')295 EMAIL_HOST = values.Value('smtp.sendgrid.com')296 EMAIL_HOST_PASSWORD = values.SecretValue(environ_prefix="", environ_name="SENDGRID_PASSWORD")297 EMAIL_HOST_USER = values.SecretValue(environ_prefix="", environ_name="SENDGRID_USERNAME")298 EMAIL_PORT = values.IntegerValue(587, environ_prefix="", environ_name="EMAIL_PORT")299 EMAIL_SUBJECT_PREFIX = values.Value('[django-play-1] ', environ_name="EMAIL_SUBJECT_PREFIX")300 EMAIL_USE_TLS = True301 SERVER_EMAIL = EMAIL_HOST_USER302 ########## END EMAIL303 ########## TEMPLATE CONFIGURATION304 # See: https://docs.djangoproject.com/en/dev/ref/settings/#template-dirs305 TEMPLATE_LOADERS = (306 ('django.template.loaders.cached.Loader', (307 'django.template.loaders.filesystem.Loader',308 'django.template.loaders.app_directories.Loader',309 )),310 )311 ########## END TEMPLATE CONFIGURATION312 ########## CACHING313 # Only do this here because thanks to django-pylibmc-sasl and pylibmc memcacheify is painful to install on windows.314 CACHES = values.CacheURLValue(default="memcached://127.0.0.1:11211")315 ########## END CACHING...

Full Screen

Full Screen

__init__.py

Source:__init__.py Github

copy

Full Screen

1"""2Utilities for determining application-specific dirs. See <https://github.com/platformdirs/platformdirs> for details and3usage.4"""5import importlib6import os7import sys8from pathlib import Path9from typing import TYPE_CHECKING, Optional, Type, Union10if TYPE_CHECKING:11 from typing_extensions import Literal # pragma: no cover12from .api import PlatformDirsABC13from .version import __version__, __version_info__14def _set_platform_dir_class() -> Type[PlatformDirsABC]:15 if os.getenv("ANDROID_DATA") == "/data" and os.getenv("ANDROID_ROOT") == "/system":16 module, name = "pip._vendor.platformdirs.android", "Android"17 elif sys.platform == "win32":18 module, name = "pip._vendor.platformdirs.windows", "Windows"19 elif sys.platform == "darwin":20 module, name = "pip._vendor.platformdirs.macos", "MacOS"21 else:22 module, name = "pip._vendor.platformdirs.unix", "Unix"23 result: Type[PlatformDirsABC] = getattr(importlib.import_module(module), name)24 return result25PlatformDirs = _set_platform_dir_class() #: Currently active platform26AppDirs = PlatformDirs #: Backwards compatibility with appdirs27def user_data_dir(28 appname: Optional[str] = None,29 appauthor: Union[str, None, "Literal[False]"] = None,30 version: Optional[str] = None,31 roaming: bool = False,32) -> str:33 """34 :param appname: See `appname <platformdirs.api.PlatformDirsABC.appname>`.35 :param appauthor: See `appauthor <platformdirs.api.PlatformDirsABC.appauthor>`.36 :param version: See `version <platformdirs.api.PlatformDirsABC.version>`.37 :param roaming: See `roaming <platformdirs.api.PlatformDirsABC.version>`.38 :returns: data directory tied to the user39 """40 return PlatformDirs(appname=appname, appauthor=appauthor, version=version, roaming=roaming).user_data_dir41def site_data_dir(42 appname: Optional[str] = None,43 appauthor: Union[str, None, "Literal[False]"] = None,44 version: Optional[str] = None,45 multipath: bool = False,46) -> str:47 """48 :param appname: See `appname <platformdirs.api.PlatformDirsABC.appname>`.49 :param appauthor: See `appauthor <platformdirs.api.PlatformDirsABC.appauthor>`.50 :param version: See `version <platformdirs.api.PlatformDirsABC.version>`.51 :param multipath: See `roaming <platformdirs.api.PlatformDirsABC.multipath>`.52 :returns: data directory shared by users53 """54 return PlatformDirs(appname=appname, appauthor=appauthor, version=version, multipath=multipath).site_data_dir55def user_config_dir(56 appname: Optional[str] = None,57 appauthor: Union[str, None, "Literal[False]"] = None,58 version: Optional[str] = None,59 roaming: bool = False,60) -> str:61 """62 :param appname: See `appname <platformdirs.api.PlatformDirsABC.appname>`.63 :param appauthor: See `appauthor <platformdirs.api.PlatformDirsABC.appauthor>`.64 :param version: See `version <platformdirs.api.PlatformDirsABC.version>`.65 :param roaming: See `roaming <platformdirs.api.PlatformDirsABC.version>`.66 :returns: config directory tied to the user67 """68 return PlatformDirs(appname=appname, appauthor=appauthor, version=version, roaming=roaming).user_config_dir69def site_config_dir(70 appname: Optional[str] = None,71 appauthor: Union[str, None, "Literal[False]"] = None,72 version: Optional[str] = None,73 multipath: bool = False,74) -> str:75 """76 :param appname: See `appname <platformdirs.api.PlatformDirsABC.appname>`.77 :param appauthor: See `appauthor <platformdirs.api.PlatformDirsABC.appauthor>`.78 :param version: See `version <platformdirs.api.PlatformDirsABC.version>`.79 :param multipath: See `roaming <platformdirs.api.PlatformDirsABC.multipath>`.80 :returns: config directory shared by the users81 """82 return PlatformDirs(appname=appname, appauthor=appauthor, version=version, multipath=multipath).site_config_dir83def user_cache_dir(84 appname: Optional[str] = None,85 appauthor: Union[str, None, "Literal[False]"] = None,86 version: Optional[str] = None,87 opinion: bool = True,88) -> str:89 """90 :param appname: See `appname <platformdirs.api.PlatformDirsABC.appname>`.91 :param appauthor: See `appauthor <platformdirs.api.PlatformDirsABC.appauthor>`.92 :param version: See `version <platformdirs.api.PlatformDirsABC.version>`.93 :param opinion: See `roaming <platformdirs.api.PlatformDirsABC.opinion>`.94 :returns: cache directory tied to the user95 """96 return PlatformDirs(appname=appname, appauthor=appauthor, version=version, opinion=opinion).user_cache_dir97def user_state_dir(98 appname: Optional[str] = None,99 appauthor: Union[str, None, "Literal[False]"] = None,100 version: Optional[str] = None,101 roaming: bool = False,102) -> str:103 """104 :param appname: See `appname <platformdirs.api.PlatformDirsABC.appname>`.105 :param appauthor: See `appauthor <platformdirs.api.PlatformDirsABC.appauthor>`.106 :param version: See `version <platformdirs.api.PlatformDirsABC.version>`.107 :param roaming: See `roaming <platformdirs.api.PlatformDirsABC.version>`.108 :returns: state directory tied to the user109 """110 return PlatformDirs(appname=appname, appauthor=appauthor, version=version, roaming=roaming).user_state_dir111def user_log_dir(112 appname: Optional[str] = None,113 appauthor: Union[str, None, "Literal[False]"] = None,114 version: Optional[str] = None,115 opinion: bool = True,116) -> str:117 """118 :param appname: See `appname <platformdirs.api.PlatformDirsABC.appname>`.119 :param appauthor: See `appauthor <platformdirs.api.PlatformDirsABC.appauthor>`.120 :param version: See `version <platformdirs.api.PlatformDirsABC.version>`.121 :param opinion: See `roaming <platformdirs.api.PlatformDirsABC.opinion>`.122 :returns: log directory tied to the user123 """124 return PlatformDirs(appname=appname, appauthor=appauthor, version=version, opinion=opinion).user_log_dir125def user_documents_dir() -> str:126 """127 :returns: documents directory tied to the user128 """129 return PlatformDirs().user_documents_dir130def user_runtime_dir(131 appname: Optional[str] = None,132 appauthor: Union[str, None, "Literal[False]"] = None,133 version: Optional[str] = None,134 opinion: bool = True,135) -> str:136 """137 :param appname: See `appname <platformdirs.api.PlatformDirsABC.appname>`.138 :param appauthor: See `appauthor <platformdirs.api.PlatformDirsABC.appauthor>`.139 :param version: See `version <platformdirs.api.PlatformDirsABC.version>`.140 :param opinion: See `opinion <platformdirs.api.PlatformDirsABC.opinion>`.141 :returns: runtime directory tied to the user142 """143 return PlatformDirs(appname=appname, appauthor=appauthor, version=version, opinion=opinion).user_runtime_dir144def user_data_path(145 appname: Optional[str] = None,146 appauthor: Union[str, None, "Literal[False]"] = None,147 version: Optional[str] = None,148 roaming: bool = False,149) -> Path:150 """151 :param appname: See `appname <platformdirs.api.PlatformDirsABC.appname>`.152 :param appauthor: See `appauthor <platformdirs.api.PlatformDirsABC.appauthor>`.153 :param version: See `version <platformdirs.api.PlatformDirsABC.version>`.154 :param roaming: See `roaming <platformdirs.api.PlatformDirsABC.version>`.155 :returns: data path tied to the user156 """157 return PlatformDirs(appname=appname, appauthor=appauthor, version=version, roaming=roaming).user_data_path158def site_data_path(159 appname: Optional[str] = None,160 appauthor: Union[str, None, "Literal[False]"] = None,161 version: Optional[str] = None,162 multipath: bool = False,163) -> Path:164 """165 :param appname: See `appname <platformdirs.api.PlatformDirsABC.appname>`.166 :param appauthor: See `appauthor <platformdirs.api.PlatformDirsABC.appauthor>`.167 :param version: See `version <platformdirs.api.PlatformDirsABC.version>`.168 :param multipath: See `multipath <platformdirs.api.PlatformDirsABC.multipath>`.169 :returns: data path shared by users170 """171 return PlatformDirs(appname=appname, appauthor=appauthor, version=version, multipath=multipath).site_data_path172def user_config_path(173 appname: Optional[str] = None,174 appauthor: Union[str, None, "Literal[False]"] = None,175 version: Optional[str] = None,176 roaming: bool = False,177) -> Path:178 """179 :param appname: See `appname <platformdirs.api.PlatformDirsABC.appname>`.180 :param appauthor: See `appauthor <platformdirs.api.PlatformDirsABC.appauthor>`.181 :param version: See `version <platformdirs.api.PlatformDirsABC.version>`.182 :param roaming: See `roaming <platformdirs.api.PlatformDirsABC.version>`.183 :returns: config path tied to the user184 """185 return PlatformDirs(appname=appname, appauthor=appauthor, version=version, roaming=roaming).user_config_path186def site_config_path(187 appname: Optional[str] = None,188 appauthor: Union[str, None, "Literal[False]"] = None,189 version: Optional[str] = None,190 multipath: bool = False,191) -> Path:192 """193 :param appname: See `appname <platformdirs.api.PlatformDirsABC.appname>`.194 :param appauthor: See `appauthor <platformdirs.api.PlatformDirsABC.appauthor>`.195 :param version: See `version <platformdirs.api.PlatformDirsABC.version>`.196 :param multipath: See `roaming <platformdirs.api.PlatformDirsABC.multipath>`.197 :returns: config path shared by the users198 """199 return PlatformDirs(appname=appname, appauthor=appauthor, version=version, multipath=multipath).site_config_path200def user_cache_path(201 appname: Optional[str] = None,202 appauthor: Union[str, None, "Literal[False]"] = None,203 version: Optional[str] = None,204 opinion: bool = True,205) -> Path:206 """207 :param appname: See `appname <platformdirs.api.PlatformDirsABC.appname>`.208 :param appauthor: See `appauthor <platformdirs.api.PlatformDirsABC.appauthor>`.209 :param version: See `version <platformdirs.api.PlatformDirsABC.version>`.210 :param opinion: See `roaming <platformdirs.api.PlatformDirsABC.opinion>`.211 :returns: cache path tied to the user212 """213 return PlatformDirs(appname=appname, appauthor=appauthor, version=version, opinion=opinion).user_cache_path214def user_state_path(215 appname: Optional[str] = None,216 appauthor: Union[str, None, "Literal[False]"] = None,217 version: Optional[str] = None,218 roaming: bool = False,219) -> Path:220 """221 :param appname: See `appname <platformdirs.api.PlatformDirsABC.appname>`.222 :param appauthor: See `appauthor <platformdirs.api.PlatformDirsABC.appauthor>`.223 :param version: See `version <platformdirs.api.PlatformDirsABC.version>`.224 :param roaming: See `roaming <platformdirs.api.PlatformDirsABC.version>`.225 :returns: state path tied to the user226 """227 return PlatformDirs(appname=appname, appauthor=appauthor, version=version, roaming=roaming).user_state_path228def user_log_path(229 appname: Optional[str] = None,230 appauthor: Union[str, None, "Literal[False]"] = None,231 version: Optional[str] = None,232 opinion: bool = True,233) -> Path:234 """235 :param appname: See `appname <platformdirs.api.PlatformDirsABC.appname>`.236 :param appauthor: See `appauthor <platformdirs.api.PlatformDirsABC.appauthor>`.237 :param version: See `version <platformdirs.api.PlatformDirsABC.version>`.238 :param opinion: See `roaming <platformdirs.api.PlatformDirsABC.opinion>`.239 :returns: log path tied to the user240 """241 return PlatformDirs(appname=appname, appauthor=appauthor, version=version, opinion=opinion).user_log_path242def user_documents_path() -> Path:243 """244 :returns: documents path tied to the user245 """246 return PlatformDirs().user_documents_path247def user_runtime_path(248 appname: Optional[str] = None,249 appauthor: Union[str, None, "Literal[False]"] = None,250 version: Optional[str] = None,251 opinion: bool = True,252) -> Path:253 """254 :param appname: See `appname <platformdirs.api.PlatformDirsABC.appname>`.255 :param appauthor: See `appauthor <platformdirs.api.PlatformDirsABC.appauthor>`.256 :param version: See `version <platformdirs.api.PlatformDirsABC.version>`.257 :param opinion: See `opinion <platformdirs.api.PlatformDirsABC.opinion>`.258 :returns: runtime path tied to the user259 """260 return PlatformDirs(appname=appname, appauthor=appauthor, version=version, opinion=opinion).user_runtime_path261__all__ = [262 "__version__",263 "__version_info__",264 "PlatformDirs",265 "AppDirs",266 "PlatformDirsABC",267 "user_data_dir",268 "user_config_dir",269 "user_cache_dir",270 "user_state_dir",271 "user_log_dir",272 "user_documents_dir",273 "user_runtime_dir",274 "site_data_dir",275 "site_config_dir",276 "user_data_path",277 "user_config_path",278 "user_cache_path",279 "user_state_path",280 "user_log_path",281 "user_documents_path",282 "user_runtime_path",283 "site_data_path",284 "site_config_path",...

Full Screen

Full Screen

Automation Testing Tutorials

Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.

LambdaTest Learning Hubs:

YouTube

You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.

Run lettuce_webdriver automation tests on LambdaTest cloud grid

Perform automation testing on 3000+ real desktop and mobile devices online.

Try LambdaTest Now !!

Get 100 minutes of automation test minutes FREE!!

Next-Gen App & Browser Testing Cloud

Was this article helpful?

Helpful

NotHelpful