Skip to content
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

Fix python tests #360

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,15 @@ env:
HOMEBREW_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}

jobs:
python-test:
runs-on: ubuntu-latest
steps:
- name: Run python tests
id: python-tests
run: python -m unittest

generate-matrix:
needs: python-tests
outputs:
matrix: ${{ steps.generate-matrix.outputs.matrix }}
runs-on: ubuntu-latest
Expand Down
9 changes: 2 additions & 7 deletions test_meta_selector.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,7 @@ def test_run_should_set_url_to_meta_readme_from_current_repository(self):
stdout=subprocess.PIPE
).stdout.decode("utf-8")).splitlines()
interesting = [l for l in stdout if l.startswith("origin")]
first = interesting[0]
if first.find("fluffynuts") > -1:
expectedUrl = "https://raw.githubusercontent.com/fluffynuts/homebrew-dotnet-sdk-versions/master/META.md"
else:
# try to make this work when it's finally merged...
expectedUrl = "https://raw.githubusercontent.com/isen-ng/homebrew-dotnet-sdk-versions/master/META.md"
expectedUrl = "https://github.com/isen-ng/homebrew-dotnet-sdk-versions/raw/master/META.md"

self.create_caskfile("7-0-200")
expected_version = "7-0-400"
Expand Down Expand Up @@ -96,7 +91,7 @@ def test_run_should_append_non_variable_lines(self):
raw = self.read_work_file_raw(expected_file)
self.assertContains(raw, "name \".NET Core SDK #{version.csv.first}\"")
self.assertContains(raw, "desc \"This cask follows releases from https://github.com/dotnet/core/tree/master\"")
self.assertContains(raw, "homepage \"https://www.microsoft.com/net/core#macos\"")
self.assertContains(raw, "homepage \"https://github.com/isen-ng/homebrew-dotnet-sdk-versions\"")

def test_run_should_not_duplicate_depends_on(self):
self.create_caskfile("7-0-200")
Expand Down