Closed ehmatthes closed 1 year ago
pip install --upgrade pip
fails. It wants python -m pip install --upgrade pip
.simple_deploy --help
works. ???ERROR: Could not find a version that satisfies the requirement tzdata; sys_platform == "win32" (from django) (from versions: none)
ERROR: No matching distribution found for tzdata; sys_platform == "win32"
pip freeze
shows nothing. So, I think it moves on to installing django-simple-deploy, which is how it ends up with some packages installed.tzdata
to vendor/.simple_deploy --help
and simple_deploy
, with appropriate output. But pytest platform_agnostic_tests/test_valid_cli_commands.py
fails.
=============================================================== FAILURES ============
_______________________________________________________ test_help_output[req_txt] __________________
tmp_project = WindowsPath('C:/Users/eric/AppData/Local/Temp/pytest-of-eric/pytest-4/blog_project0') capfd = <_pytest.capture.CaptureFixture object at 0x000002178B03A210>
def test_help_output(tmp_project, capfd):
"""Call `manage.py simple_deploy --help`."""
valid_sd_command = "python manage.py simple_deploy --help"
stdout, stderr = msp.call_simple_deploy(tmp_project, valid_sd_command)
C:\Users\eric\django-simple-deploy\unit_tests\platform_agnostic_tests\test_valid_cli_commands.py:22:
C:\Users\eric\django-simple-deploy\unit_tests\utils\manage_sample_project.py:161: in call_simple_deploy sd_call = subprocess.Popen(split(sd_command), stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True) C:\Users\eric\AppData\Local\Programs\Python\Python311\Lib\subprocess.py:1024: in init self._execute_child(args, executable, preexec_fn, close_fds,
- All platform-agnostic tests pass. There were issues with conversion of commands on Windows. GPT was really helpful in sorting through these. For the record, it did not suggest clear fixes, there was a lot of back and forth, but so much more efficient than SO and documentation dives.
manage.py simple_deploy --platform heroku --unit-testing
, and it configures the project.run_simple_deploy()
, where the regex for finding the platform was os-specific.utils.write_file_from_template()
. Fixed this, and 7 tests pass..dockerignore
is different on Windows, because it doesn't need to include .DS_Store
.
Running unit tests on Windows should go a long way toward making sure everything works on Windows.