Skip to content

Commit

Permalink
Merge pull request #736 from opensafely-core/replace-pytest-freezegun
Browse files Browse the repository at this point in the history
Replace pytest-freezegun with pytest-freezer
  • Loading branch information
rebkwok authored Aug 13, 2024
2 parents a8107d9 + a1e5953 commit 57378f2
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
10 changes: 5 additions & 5 deletions docker/justfile
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ build env="dev": tmpdir
export GITREF=$(git rev-parse --short HEAD)

# build the thing
docker-compose build --pull {{ env }}
docker compose build --pull {{ env }}

tmpdir:
#!/bin/bash
Expand All @@ -53,19 +53,19 @@ tmpdir:
# run tests in docker container
test *args: build
#!/bin/bash
docker-compose run --rm test {{ args }}
docker compose run --rm test {{ args }}

# run dev server in docker container
service: build
docker-compose up dev
docker compose up dev

# run command in dev container
run env="dev" *args="bash": build
docker-compose run --rm {{ env }} {{ args }}
docker compose run --rm {{ env }} {{ args }}

# exec command in existing dev container
exec *args="bash":
docker-compose exec dev {{ args }}
docker compose exec dev {{ args }}

clean:
#!/bin/bash
Expand Down
2 changes: 1 addition & 1 deletion requirements.dev.in
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ pip-tools
pre-commit
pytest
pytest-cov
pytest-freezegun
pytest-freezer
pytest-responses
requests_mock
6 changes: 3 additions & 3 deletions requirements.dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ flake8-implicit-str-concat==0.3.0
flake8-no-pep420==2.2.0
# via -r requirements.dev.in
freezegun==1.2.1
# via pytest-freezegun
# via pytest-freezer
hypothesis==6.39.4
# via -r requirements.dev.in
identify==2.4.12
Expand Down Expand Up @@ -92,11 +92,11 @@ pytest==7.1.1
# via
# -r requirements.dev.in
# pytest-cov
# pytest-freezegun
# pytest-freezer
# pytest-responses
pytest-cov==3.0.0
# via -r requirements.dev.in
pytest-freezegun==0.4.2
pytest-freezer==0.4.8
# via -r requirements.dev.in
pytest-responses==0.5.0
# via -r requirements.dev.in
Expand Down

0 comments on commit 57378f2

Please sign in to comment.