File: test_buildings.py

package info (click to toggle)
freeorion 0.5.1-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 194,940 kB
  • sloc: cpp: 186,508; python: 40,969; ansic: 1,164; xml: 719; makefile: 32; sh: 7
file content (12 lines) | stat: -rw-r--r-- 334 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
import pytest

from buildings import Shipyard


def test_get_shipyard_by_calling_constructor():
    assert Shipyard.GEO == Shipyard("BLD_SHIPYARD_CON_GEOINT")


def test_invalid_shipyard_raises_value_error_if_passed_via_constructor():
    with pytest.raises(ValueError, match="'XXX' is not a valid Shipyard"):
        Shipyard("XXX")