Skip to content

Commit

Permalink
Merge branch 'v3' into rebound-bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
sblunt committed Jan 12, 2024
2 parents c12c991 + 3424fcc commit 66d6d23
Show file tree
Hide file tree
Showing 3 changed files with 59 additions and 8 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,5 +40,9 @@ jobs:
run: |
pytest --cov
- name: Coveralls GitHub Action
if: ${{ matrix.python-version }} == '3.12'
uses: coverallsapp/github-action@v2

with:
parallel: true
flag-name: run-$

4 changes: 2 additions & 2 deletions .github/workflows/run-notebooks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install jupyter setuptools wheel
python -m pip install jupyter setuptools wheel nbmake
python -m pip install -r requirements.txt
python -m pip install . --no-build-isolation
- name: Run tutorial notebooks
run: |
jupyter execute docs/tutorials/*.ipynb
py.test --nbmake docs/tutorials/*.ipynb
57 changes: 52 additions & 5 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

codeastro_mode = False


def pytest_addoption(parser):
parser.addoption(
"--mode",
Expand All @@ -10,21 +11,67 @@ def pytest_addoption(parser):
help="different test modes NAME.",
)


def pytest_runtest_setup(item):
global codeastro_mode
envnames = [mark.args[0] for mark in item.iter_markers(name="mode")]
if envnames:
if item.config.getoption("--mode") == 'codeastro':
if item.config.getoption("--mode") == "codeastro":
codeastro_mode = True

a1 = [83, 101, 99, 114, 101, 116, 32, 67, 111, 100, 101, 58, 32, 119, 101, 100, 105, 100, 105, 116, 33]
a2 = [78, 111, 32, 115, 101, 99, 114, 101, 116, 32, 99, 111, 100, 101, 32, 121, 101, 116, 46]

a1 = [
83,
101,
99,
114,
101,
116,
32,
67,
111,
100,
101,
58,
32,
119,
101,
100,
105,
100,
105,
116,
33,
]
a2 = [
78,
111,
32,
115,
101,
99,
114,
101,
116,
32,
99,
111,
100,
101,
32,
121,
101,
116,
46,
]


@pytest.hookimpl()
def pytest_terminal_summary(terminalreporter, exitstatus, config):
if config.getoption("--mode") == 'codeastro':
if config.getoption("--mode") == "codeastro":
if terminalreporter._session.testsfailed == 0:
vals = a1
else:
vals = a2
output_str = "".join([chr(x) for x in vals])
print(output_str)
print(output_str)

0 comments on commit 66d6d23

Please sign in to comment.