일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- CNN
- SPL
- pandas
- E-P1
- mean
- pip
- pycharm
- DFS
- index
- imread
- Splunk
- GT-S80
- Numpy
- mariadb
- LSTM
- 알고리즘
- ipad
- SciPy
- install
- dataframe
- synology
- GitHub
- keras
- Lotto
- 삼성소프트웨어멤버십
- Series
- javascript
- RNN
- Python
- Button
- Today
- Total
목록unit (2)
잠토의 잠망경
VSCode로 python을 작성하려한다. 가장 기본이 되는 unittest를 하기 위한 환경 설정이 필요하여 기록으로 남긴다. 폴더 구성 index 파일이름 1 settings.json 2 sample009_01.py 3 sample009_01_test.py 사전 준비 { "python.pythonPath": "C:\\Users\\xxxxx\\AppData\\Local\\Programs\\Python\\Python36\\python.exe", "python.testing.unittestEnabled": false, "python.testing.nosetestsEnabled": false, "python.testing.pytestEnabled": true } unit code sample Target F..
참고 pycharm에서는 실행에 unitest 부분이 있다. 이걸로 실행한다. sample code def add(a, c): return a+c def mul(a, c): return a*c def divided(a, c): return a/c test code github import unittest import sample.myCalc as myCalc class myCalcTest(unittest.TestCase): def test_add(self): c = myCalc.add(10, 30) self.assertEqual(c, 40) def test_mul(self): c = myCalc.mul(10, 30) self.assertEqual(c, 300) def test_divided(self): ..