-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Use src directory structure. Also remove MANIFEST.in, since all the data files seems to be picked up by setuptools by default. * Add test. * Fix inclusion of data files.
- Loading branch information
Showing
14 changed files
with
21 additions
and
6 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import pytest | ||
import numpy as np | ||
|
||
def test_conductor(): | ||
from strdcable.cable import Conductor | ||
cable = Conductor( | ||
dwires=np.array([3e-3, 2e-3]), | ||
nbwires=np.array([1, 6]), | ||
material=np.array(['ST6C', 'AL1']), # 'ST6C' is a grade of steel, 'AL1' is a grade of aluminium | ||
laylengths=np.array([np.nan, 0.2]) | ||
) | ||
|
||
assert cable.A == pytest.approx(2.5918139392115792e-05) | ||
assert cable.m == pytest.approx(0.10604410834231327) | ||
assert cable.EA == pytest.approx(2733197.4739603605) | ||
|