Ejemplo n.º 1
0
def test_get_distribution_from_source_file_file_path_being_a_directory():
    "freeze.get_distribution_from_source_file(file_path) Should support receiving relative directories in `file_path`"

    # Given a path for a package
    path = 'sure'

    # When I retrieve the distribution for a given file
    distribution = freeze.get_distribution_from_source_file(path)

    # Then I see the right distribution was found
    distribution.name.should.equal('sure')
Ejemplo n.º 2
0
def test_get_distribution_from_source_file():
    "freeze.get_distribution_from_source_file(file_path) Should return the Distribution that contains `file_path`"

    # Given a path for a package
    path = 'sure/__init__.pyc'

    # When I retrieve the distribution for a given file
    distribution = freeze.get_distribution_from_source_file(path)

    # Then I see the right distribution was found
    distribution.name.should.equal('sure')
Ejemplo n.º 3
0
def test_get_distribution_from_source_file_file_path_being_a_directory():
    "freeze.get_distribution_from_source_file(file_path) Should support receiving relative directories in `file_path`"

    # Given a path for a package
    path = 'sure'

    # When I retrieve the distribution for a given file
    distribution = freeze.get_distribution_from_source_file(path)

    # Then I see the right distribution was found
    distribution.name.should.equal('sure')
Ejemplo n.º 4
0
def test_get_distribution_from_source_file():
    "freeze.get_distribution_from_source_file(file_path) Should return the Distribution that contains `file_path`"

    # Given a path for a package
    path = 'sure/__init__.pyc'

    # When I retrieve the distribution for a given file
    distribution = freeze.get_distribution_from_source_file(path)

    # Then I see the right distribution was found
    distribution.name.should.equal('sure')
Ejemplo n.º 5
0
def test_get_distribution_from_source_file(DistributionPath):
    "freeze.get_distribution_from_source_file(file_path) Should return the Distribution that contains `file_path`"

    # Given a path for a package
    path = 'sure/__init__.pyc'

    # When I retrieve the distribution for a given file
    distribution = freeze.get_distribution_from_source_file(path)

    # Then I see that the function tried to use the module name as the
    # package name.
    DistributionPath.return_value.get_distribution.assert_called_once_with(
        'sure', )
Ejemplo n.º 6
0
def test_get_distribution_from_source_file_file_path_being_a_directory(DistributionPath):
    "freeze.get_distribution_from_source_file(file_path) Should support receiving relative directories in `file_path`"

    # Given a path for a package
    path = 'sure'

    # When I retrieve the distribution for a given file
    distribution = freeze.get_distribution_from_source_file(path)

    # Then I see that the function tried to use the module name as the
    # package name.
    DistributionPath.return_value.get_distribution.assert_called_once_with(
        'sure',
    )
Ejemplo n.º 7
0
def test_get_distribution_from_source_file(DistributionPath):
    "freeze.get_distribution_from_source_file(file_path) Should return the Distribution that contains `file_path`"

    # Given a path for a package
    path = 'sure/__init__.pyc'

    # When I retrieve the distribution for a given file
    distribution = freeze.get_distribution_from_source_file(path)

    # Then I see that the function tried to use the module name as the
    # package name.
    DistributionPath.return_value.get_distribution.assert_called_once_with(
        'sure',
    )
Ejemplo n.º 8
0
def test_get_distribution_from_source_file_file_path_being_a_directory(
        DistributionPath):
    "freeze.get_distribution_from_source_file(file_path) Should support receiving relative directories in `file_path`"

    # Given a path for a package
    path = 'sure'

    # When I retrieve the distribution for a given file
    distribution = freeze.get_distribution_from_source_file(path)

    # Then I see that the function tried to use the module name as the
    # package name.
    DistributionPath.return_value.get_distribution.assert_called_once_with(
        'sure', )