일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- terraform
- 테라폼 기본 문법
- Bash
- zshrc
- test
- customize
- 컨테이너
- Django
- iterm2 shortcuts
- 빅오노테이션
- 도커컴포즈
- 테라폼 문법
- minikube mac 설치
- DynamoDB
- 파이썬
- Shell
- BIG-O NOTATION
- nosql
- python
- zsh
- docker
- server
- iterm2 단축키
- terraform 문법
- linux
- minikube 설치 방법
- sftp란
- AWS
- 도커
- docker-compose
- Today
- Total
목록test (2)
sklass의 s-class 프로그래밍 blog
django test를 할때 명령어에서 특정 테스트만 테스트하게끔 하고 싶을때 @tag를 사용하면 수월합니다. 아래와 같이 테스트 함수 위에 @tag를 달아주세요. @tag("greeting") def test_hello(self) -> None: print("hello") @tag("introduce") def test_name(self) -> None: print("Joseph") @tag("greeting", "welcome") def test_welcome(self) -> None: print("welcome") 이렇게 하고 아래 명령어를 실행하면 됩니다. python3 manage.py test --tag="greeting" >> hello >> welcome python3 manage.py t..
django에서 test명령어를 실행할때, argument, 즉 option을 추가해서 명령어를 실행하고 싶을때가 있습니다. 이런경우, DiscoverRunner라는 Django Test의 최상위 클래스의 add_arguments()라는 classmethod를 override하면 됩니다. 아래에 예시를 참고하세요. tests/runner.py 에 아래 코드를 추가해줍니다. from django.conf import settings from django.test.runner import DiscoverRunner class TestRunner(DiscoverRunner): def __init__(self, mol_id, conformer_id, **kwargs): super().__init__(**kwar..