Skip to content

Commit

Permalink
codefactor, avoid code injection
Browse files Browse the repository at this point in the history
  • Loading branch information
timmysilv committed Dec 6, 2024
1 parent c0fc9ac commit aba8bdd
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/tests_numpy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ jobs:

- name: Copy durations to s3
if: github.event_name == 'push'
env:
REF_NAME: ${{ github.ref_name }}
run: |
grep ' call ' durations.txt | awk '{print $3,$1}' > ${{ steps.record_file.outputs.filename }}
aws s3 cp ./${{ steps.record_file.outputs.filename }} s3://${{ secrets.AWS_TIMINGS_BUCKET }}/numpy_tests/${{ github.ref_name }}/
aws s3 cp ./${{ steps.record_file.outputs.filename }} s3://${{ secrets.AWS_TIMINGS_BUCKET }}/numpy_tests/${{ env.REF_NAME }}/
4 changes: 3 additions & 1 deletion .github/workflows/tests_tensorflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@ jobs:

- name: Copy durations to s3
if: github.event_name == 'push'
env:
REF_NAME: ${{ github.ref_name }}
run: |
grep ' call ' durations.txt | awk '{print $3,$1}' > ${{ steps.record_file.outputs.filename }}
aws s3 cp ./${{ steps.record_file.outputs.filename }} s3://${{ secrets.AWS_TIMINGS_BUCKET }}/tf_tests/${{ github.ref_name }}/
aws s3 cp ./${{ steps.record_file.outputs.filename }} s3://${{ secrets.AWS_TIMINGS_BUCKET }}/tf_tests/${{ env.REF_NAME }}/
4 changes: 4 additions & 0 deletions tests/test_physics/test_wires.py
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,10 @@ def test_matmul_error(self):
with pytest.raises(ValueError):
u @ v # pylint: disable=pointless-statement


class TestWiresDisplay:
"""Test the wires _ipython_display_ functionality."""

@patch("mrmustard.physics.wires.display")
def test_ipython_repr(self, mock_display):
"""Test the IPython repr function."""
Expand Down

0 comments on commit aba8bdd

Please sign in to comment.