Skip to content

Commit

Permalink
Adds test for room.plot method
Browse files Browse the repository at this point in the history
  • Loading branch information
fakufaku committed Nov 12, 2022
1 parent daefc45 commit 1df6caa
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
[build-system]
# Minimum requirements for the build system to execute.
requires = ["setuptools", "wheel", "numpy>=1.13.0", "Cython", "pybind11>=2.2"] # PEP 508 specifications.

[tool.pytest.ini_options]
filterwarnings = [
'ignore:Matplotlib is currently using agg, which is a non-GUI backend, so cannot show the figure.:UserWarning'
]
18 changes: 18 additions & 0 deletions pyroomacoustics/tests/test_room_plot.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import pyroomacoustics as pra
import matplotlib

matplotlib.use("Agg")


def test_room_2d():
room = pra.ShoeBox([3, 4], max_order=2)
room.add_source([1.4, 2.2])
room.add_microphone([2.3, 3.5])
room.plot()


def test_room_3d():
room = pra.ShoeBox([3, 4, 5], max_order=2)
room.add_source([1.4, 2.2, 4.3])
room.add_microphone([2.3, 3.5, 2.7])
room.plot()

0 comments on commit 1df6caa

Please sign in to comment.