- 
                Notifications
    You must be signed in to change notification settings 
- Fork 115
test(templates): test py-shiny templates #1998
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
          
     Merged
      
      
    
  
     Merged
                    Changes from all commits
      Commits
    
    
            Show all changes
          
          
            24 commits
          
        
        Select commit
          Hold shift + click to select a range
      
      d173b7c
              
                add initial placeholder file
              
              
                karangattu b75da52
              
                run it on branches starting with run-
              
              
                karangattu 86fc60f
              
                just copy over the py-shiny-templates to the examples dir instead
              
              
                karangattu 6d8403c
              
                Add dependencies required by example apps
              
              
                karangattu c119aa9
              
                check for shiny-output-error
              
              
                karangattu 35ebec9
              
                linting issues
              
              
                karangattu 68edee6
              
                skip safe exception tests for output errors
              
              
                karangattu 37df231
              
                ignore global_pyplot expected output error
              
              
                karangattu b208724
              
                add relevant comments
              
              
                karangattu aaa2ee4
              
                Merge branch 'main' into run-py-shiny-template-tests
              
              
                karangattu 96771ad
              
                install deps before running the tests
              
              
                karangattu 1dfd712
              
                fix linting issues
              
              
                karangattu 3614b3f
              
                see if this fixes pyright issues
              
              
                karangattu 5286042
              
                Merge branch 'main' into run-py-shiny-template-tests
              
              
                karangattu 0de7da4
              
                Remove unused import from app.py
              
              
                karangattu ec648cc
              
                Add new allowed deprecation warnings for cufflinks
              
              
                karangattu c22da78
              
                Skip template dependency install and tests on Python 3.9
              
              
                karangattu ec26fe1
              
                Skip test on Python 3.9 due to scikit-learn version
              
              
                karangattu 960fc91
              
                Adjust make command to install deps
              
              
                schloerke ae24fc2
              
                Discard changes to tests/playwright/shiny/components/data_frame/edit/…
              
              
                schloerke 17a2825
              
                Update pyproject.toml
              
              
                schloerke 6dc0c9b
              
                default timeout is ok
              
              
                schloerke 9a5e2a0
              
                Merge branch 'run-py-shiny-template-tests' of https://github.com/posi…
              
              
                schloerke 7d869e5
              
                fix langchain install dep hell
              
              
                schloerke File filter
Filter by extension
Conversations
          Failed to load comments.   
        
        
          
      Loading
        
  Jump to
        
          Jump to file
        
      
      
          Failed to load files.   
        
        
          
      Loading
        
  Diff view
Diff view
There are no files selected for viewing
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              | Original file line number | Diff line number | Diff line change | 
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| import sys | ||
| from pathlib import Path | ||
|  | ||
| import pytest | ||
| from conftest import here_root | ||
| from example_apps import get_apps, reruns, reruns_delay, validate_example | ||
| from playwright.sync_api import Page | ||
|  | ||
| if not Path(here_root / "py-shiny-templates").exists(): | ||
| pytest.skip( | ||
| "./py-shiny-templates dir is not available. Skipping test.", | ||
| allow_module_level=True, | ||
| ) | ||
|  | ||
|  | ||
| @pytest.mark.skipif( | ||
| sys.version_info[:2] == (3, 9), | ||
| reason="Skipping test for Python 3.9 since scikit-learn pinned version is only supported on Python 3.10+", | ||
| ) | ||
| @pytest.mark.only_browser("chromium") | ||
| @pytest.mark.flaky(reruns=reruns, reruns_delay=reruns_delay) | ||
| @pytest.mark.parametrize("ex_app_path", get_apps("py-shiny-templates")) | ||
| def test_external_templates(page: Page, ex_app_path: str) -> None: | ||
| validate_example(page, ex_app_path) | 
      
      Oops, something went wrong.
        
    
  
  Add this suggestion to a batch that can be applied as a single commit.
  This suggestion is invalid because no changes were made to the code.
  Suggestions cannot be applied while the pull request is closed.
  Suggestions cannot be applied while viewing a subset of changes.
  Only one suggestion per line can be applied in a batch.
  Add this suggestion to a batch that can be applied as a single commit.
  Applying suggestions on deleted lines is not supported.
  You must change the existing code in this line in order to create a valid suggestion.
  Outdated suggestions cannot be applied.
  This suggestion has been applied or marked resolved.
  Suggestions cannot be applied from pending reviews.
  Suggestions cannot be applied on multi-line comments.
  Suggestions cannot be applied while the pull request is queued to merge.
  Suggestion cannot be applied right now. Please check back later.
  
    
  
    
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Related: #1829