forked from open-atmos/PyPartMC
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest_dtors.py
55 lines (47 loc) · 1.76 KB
/
test_dtors.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
####################################################################################################
# This file is a part of PyPartMC licensed under the GNU General Public License v3 (LICENSE file) #
# Copyright (C) 2022 University of Illinois Urbana-Champaign #
# Authors: https://github.com/open-atmos/PyPartMC/graphs/contributors #
####################################################################################################
import gc
import pytest
import PyPartMC as ppmc
from .test_aero_data import AERO_DATA_CTOR_ARG_MINIMAL
from .test_aero_mode import AERO_MODE_CTOR_LOG_NORMAL
from .test_gas_data import GAS_DATA_CTOR_ARG_MINIMAL
@pytest.mark.parametrize(
"sut",
(
pytest.param(ppmc.GasData(("SO2",)), id="GasData"),
pytest.param(ppmc.AeroData(AERO_DATA_CTOR_ARG_MINIMAL), id="AeroData"),
pytest.param(
ppmc.GasState(ppmc.GasData(GAS_DATA_CTOR_ARG_MINIMAL)), id="GasState"
),
pytest.param(
ppmc.AeroParticle(ppmc.AeroData(AERO_DATA_CTOR_ARG_MINIMAL), [0]),
id="AeroParticle",
),
pytest.param(ppmc.Photolysis(), id="Photolysis"),
pytest.param(ppmc.CampCore(), id="CampCore"),
pytest.param(
ppmc.AeroMode(
ppmc.AeroData(AERO_DATA_CTOR_ARG_MINIMAL), AERO_MODE_CTOR_LOG_NORMAL
),
id="AeroMode",
),
pytest.param(
ppmc.AeroState(
ppmc.AeroData(AERO_DATA_CTOR_ARG_MINIMAL), 1, "nummass_source"
),
id="AeroState",
),
),
)
def test_dtors(sut): # pylint: disable=unused-argument
# arrange
gc.collect()
# act
sut = None
gc.collect()
# assert
pass